]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Avoid an MSVC compiler warning about an unused function parameter.
authorFlorian Krohm <florian@eich-krohm.de>
Sun, 17 Jan 2016 16:20:14 +0000 (16:20 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sun, 17 Jan 2016 16:20:14 +0000 (16:20 +0000)
Fixes BZ #356817

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15762

NEWS
include/valgrind.h

diff --git a/NEWS b/NEWS
index 07c750efc253f4a1193575149d39aff66e770ed8..8aebe231ba9f0e4d3d8021b20fb2ceafee4de7d5 100644 (file)
--- 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
 
index 511ae1c7e2526731ad288265062d42d9fad2f714..835c92697f7440a4e92c35da44b1d3a2890f2f5a 100644 (file)
@@ -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__)