From bc99b33602795e4db64bfdc924ce8ef1b6f5cc78 Mon Sep 17 00:00:00 2001 From: Koundinya Veluri Date: Wed, 23 Sep 2015 12:19:33 -0700 Subject: Fix a few issues reported by cppcheck --- src/pal/src/misc/perftrace.cpp | 2 +- .../synchronization/nativecs_interlocked/pal_composite_native_cs.c | 6 +++--- src/utilcode/utilmessagebox.cpp | 3 +++ src/vm/callingconvention.h | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pal/src/misc/perftrace.cpp b/src/pal/src/misc/perftrace.cpp index d2bfd797cf..d4223a629a 100644 --- a/src/pal/src/misc/perftrace.cpp +++ b/src/pal/src/misc/perftrace.cpp @@ -785,7 +785,7 @@ PERFReadSetting( ) //more code is required to deal with corrupted input file. BOOL ret; unsigned int index; - char line[256 /* PAL_PERF_MAX_INPUT */]; // just use it. can define a new one like MAX_LINE=1024; + char line[PAL_PERF_MAX_INPUT]; char * ptr; char function_name[PAL_PERF_MAX_FUNCTION_NAME]; //no function can be longer than 127 bytes. diff --git a/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/pal_composite_native_cs.c b/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/pal_composite_native_cs.c index 896934065b..7c825375eb 100644 --- a/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/pal_composite_native_cs.c +++ b/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/pal_composite_native_cs.c @@ -317,7 +317,7 @@ void starttests(int threadID) ULONGLONG startTime = 0; ULONGLONG endTime = 0; - LONG volatile * Destination; + LONG volatile Destination; LONG Exchange; LONG Comperand; LONG result; @@ -336,10 +336,10 @@ void starttests(int threadID) for (i=0;i::ForceSigWalk() #ifdef FEATURE_INTERPRETER BYTE callconv = CallConv(); switch (callconv) + { case IMAGE_CEE_CS_CALLCONV_C: case IMAGE_CEE_CS_CALLCONV_STDCALL: numRegistersUsed = NUM_ARGUMENT_REGISTERS; -- cgit v1.2.3