From: Florian Krohm Date: Sun, 17 Jan 2016 16:20:14 +0000 (+0000) Subject: Avoid an MSVC compiler warning about an unused function parameter. X-Git-Tag: svn/VALGRIND_3_12_0~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6156d8f845714e102827e1831b712af15993013;p=thirdparty%2Fvalgrind.git Avoid an MSVC compiler warning about an unused function parameter. Fixes BZ #356817 git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15762 --- diff --git a/NEWS b/NEWS index 07c750efc2..8aebe231ba 100644 --- a/NEWS +++ b/NEWS @@ -57,6 +57,7 @@ where XXXXXX is the bug number as listed below. 355455 stderr.exp of test cases wrapmalloc and wrapmallocstatic overconstrained 355454 do not intercept malloc related symbols from the runtime linker 356044 Dwarf line info reader misinterprets is_stmt register +356817 valgrind.h triggers compiler errors on MSVC when defining NVALGRIND 357871 pthread_spin_destroy not properly wrapped 357887 Fix a file handle leak. VG_(fclose) did not close the file diff --git a/include/valgrind.h b/include/valgrind.h index 511ae1c7e2..835c92697f 100644 --- a/include/valgrind.h +++ b/include/valgrind.h @@ -6759,6 +6759,7 @@ __inline VALGRIND_PRINTF(const char *format, ...) { #if defined(NVALGRIND) + if (format) *(volatile const *)format; // avoid compiler warning return 0; #else /* NVALGRIND */ #if defined(_MSC_VER) || defined(__MINGW64__) @@ -6797,6 +6798,7 @@ __inline VALGRIND_PRINTF_BACKTRACE(const char *format, ...) { #if defined(NVALGRIND) + if (format) *(volatile const *)format; // avoid compiler warning return 0; #else /* NVALGRIND */ #if defined(_MSC_VER) || defined(__MINGW64__)