Bugzilla – Attachment 62755 Details for
Bug 39440
cppcheck cleanliness
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to avoid unused variable warnings reported
0002-Avoid-unused-variables-code-warnings-with-cppcheck.patch (text/plain), 5.25 KB, created by
Martyn Russell
on 2012-06-07 11:23:55 UTC
(
hide
)
Description:
Patch to avoid unused variable warnings reported
Filename:
MIME Type:
Creator:
Martyn Russell
Created:
2012-06-07 11:23:55 UTC
Size:
5.25 KB
patch
obsolete
>From e58a7c07c866da0e2f30c7b72f5751d4925955a3 Mon Sep 17 00:00:00 2001 >From: Martyn Russell <martyn@lanedo.com> >Date: Thu, 7 Jun 2012 19:19:49 +0100 >Subject: [PATCH 2/2] Avoid unused variables code warnings with cppcheck > >Part of Bug 39440 > >Change-Id: I51ba83c5356f2eb33ed09f6516de9f004678bc8f >--- > dmake/dbug/malloc/testmlc.c | 4 ---- > dmake/msdos/dstrlwr.c | 2 -- > dmake/unix/runargv.c | 3 +-- > dmake/win95/microsft/vpp40/runargv.c | 1 - > dmake/winnt/microsft/vpp40/runargv.c | 1 - > embeddedobj/test/Container1/nativelib/nativeview.c | 7 +++++++ > extensions/test/ole/OleClient/clientTest.cxx | 1 - > l10ntools/source/help/HelpLinker.cxx | 7 +++++-- > 8 files changed, 13 insertions(+), 13 deletions(-) > >diff --git a/dmake/dbug/malloc/testmlc.c b/dmake/dbug/malloc/testmlc.c >index 16e1173..a0fd728 100644 >--- a/dmake/dbug/malloc/testmlc.c >+++ b/dmake/dbug/malloc/testmlc.c >@@ -44,10 +44,6 @@ char **argv; > int cnt; /* number of allocated objects */ > int nm = 0; /* number of mallocs */ > int nre = 0; /* number of reallocs */ >- int nal; /* number of allocated objects */ >- int nfre; /* number of free list objects */ >- long alm; /* memory in allocated objects */ >- long frem; /* memory in free list */ > long startsize; /* size at loop start */ > long endsize; /* size at loop exit */ > long maxiter = 0; /* real max # iterations */ >diff --git a/dmake/msdos/dstrlwr.c b/dmake/msdos/dstrlwr.c >index 64027eb..79c5848 100644 >--- a/dmake/msdos/dstrlwr.c >+++ b/dmake/msdos/dstrlwr.c >@@ -31,8 +31,6 @@ dstrlwr(entry, target) > char *entry; > char *target; > { >- char *p; >- > if (STOBOOL(DcacheRespCase)) > return; > >diff --git a/dmake/unix/runargv.c b/dmake/unix/runargv.c >index 0e41c18..4a98254 100644 >--- a/dmake/unix/runargv.c >+++ b/dmake/unix/runargv.c >@@ -844,8 +844,6 @@ int pqid; > PUBLIC void > Clean_up_processes() > { >- int ret; >- > if( _procs != NIL(PR) ) > { > register int i; >@@ -853,6 +851,7 @@ Clean_up_processes() > if( _procs[i].pr_valid ) > { > #if !defined(USE_CREATEPROCESS) >+ int ret; > if( (ret = kill(_procs[i].pr_pid, SIGTERM)) ) > { > fprintf(stderr, "Killing of pid %d from pq[%d] failed with: %s - %d ret: %d\n", >diff --git a/dmake/win95/microsft/vpp40/runargv.c b/dmake/win95/microsft/vpp40/runargv.c >index c482859..309e745 100644 >--- a/dmake/win95/microsft/vpp40/runargv.c >+++ b/dmake/win95/microsft/vpp40/runargv.c >@@ -181,7 +181,6 @@ int pid; > int status; > { > register int i; >- register PR *pp; > char *dir; > > for( i=0; i<Max_proc; i++ ) >diff --git a/dmake/winnt/microsft/vpp40/runargv.c b/dmake/winnt/microsft/vpp40/runargv.c >index 2ffef70..6184209 100644 >--- a/dmake/winnt/microsft/vpp40/runargv.c >+++ b/dmake/winnt/microsft/vpp40/runargv.c >@@ -180,7 +180,6 @@ int pid; > int status; > { > register int i; >- register PR *pp; > char *dir; > > for( i=0; i<Max_proc; i++ ) >diff --git a/embeddedobj/test/Container1/nativelib/nativeview.c b/embeddedobj/test/Container1/nativelib/nativeview.c >index 6952fe9..0de1018 100644 >--- a/embeddedobj/test/Container1/nativelib/nativeview.c >+++ b/embeddedobj/test/Container1/nativelib/nativeview.c >@@ -76,7 +76,14 @@ JNIEXPORT jlong JNICALL Java_embeddedobj_test_NativeView_getNativeWindow > JAWT awt ; > JAWT_DrawingSurface* ds ; > JAWT_DrawingSurfaceInfo* dsi ; >+#ifdef WNT > JAWT_Win32DrawingSurfaceInfo* dsi_win ; >+#else >+ // FIXME: Where is dsi_x11 defined? >+ // Added below because I'm guessing this test breaks >+ // >+ // JAWT_X11DrawingSurfaceInfo*dsi_x11 ; >+#endif > jlong drawable; > > /* Get the AWT */ >diff --git a/extensions/test/ole/OleClient/clientTest.cxx b/extensions/test/ole/OleClient/clientTest.cxx >index 00e2a25..2949cc5 100644 >--- a/extensions/test/ole/OleClient/clientTest.cxx >+++ b/extensions/test/ole/OleClient/clientTest.cxx >@@ -116,7 +116,6 @@ bool doParameterTest(const Reference<XInvocation> & inv) > Sequence<Any> seqOut; > > Any arArgs[2]; >- Any arValue[2]; > Any arArgs1[4]; > > NamedArgument arg1(OUString(L"val1"), makeAny((sal_Int32) 123)); >diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx >index a95c56b..6d150a8 100644 >--- a/l10ntools/source/help/HelpLinker.cxx >+++ b/l10ntools/source/help/HelpLinker.cxx >@@ -642,8 +642,11 @@ void HelpLinker::link() throw( HelpProcessingException ) > const std::string &additionalFileKey = enumer->first; > > fs::path fsAdditionalFileName( additionalFileName, fs::native ); >- std::string aNativeStr = fsAdditionalFileName.native_file_string(); >- HCDBG(const char* pStr = aNativeStr.c_str(); std::cerr << pStr << std::endl); >+ HCDBG({ >+ std::string aNativeStr = fsAdditionalFileName.native_file_string(); >+ const char* pStr = aNativeStr.c_str(); >+ std::cerr << pStr << std::endl; >+ }); > > fs::path fsTargetName( indexDirParentName / additionalFileKey ); > >-- >1.7.9.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 39440
:
62750
|
62755
|
64577