From 578deb65b090f0c1486f901ea2d00bb456f7f4c5 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 30 Nov 2012 09:50:30 +0000 Subject: zlib.c: suppress warning * ext/zlib/zlib.c (zlib_mem_alloc): suppress unused-value warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/zlib/zlib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/zlib/zlib.c') diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 8c3d84d4a3..9aa7697697 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -21,8 +21,8 @@ # define VALGRIND_MAKE_MEM_UNDEFINED(p, n) VALGRIND_MAKE_WRITABLE((p), (n)) # endif #else -# define VALGRIND_MAKE_MEM_DEFINED(p, n) /* empty */ -# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) /* empty */ +# define VALGRIND_MAKE_MEM_DEFINED(p, n) 0 +# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0 #endif #define RUBY_ZLIB_VERSION "0.6.0" @@ -588,7 +588,7 @@ zlib_mem_alloc(voidpf opaque, uInt items, uInt size) deflate is performing a conditional jump that depends on an uninitialized value. Isn't that a bug? http://www.zlib.net/zlib_faq.html#faq36 */ - VALGRIND_MAKE_MEM_DEFINED(p, items * size); + (void)VALGRIND_MAKE_MEM_DEFINED(p, items * size); return p; } -- cgit v1.2.3