From: Florian Krohm Date: Sun, 2 Aug 2015 19:31:14 +0000 (+0000) Subject: As pointed out by GCC 5.1 macro arguments ought to be paranthesized X-Git-Tag: svn/VALGRIND_3_11_0~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56e0f1ed288060ec90640ebf39353460c4f41d61;p=thirdparty%2Fvalgrind.git As pointed out by GCC 5.1 macro arguments ought to be paranthesized when referenced. Previously CHECK(a && b) would expand to !a && b which clearly was not the intention. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15470 --- diff --git a/memcheck/tests/unit_libcbase.c b/memcheck/tests/unit_libcbase.c index 19595f99e9..63f1d79d6a 100644 --- a/memcheck/tests/unit_libcbase.c +++ b/memcheck/tests/unit_libcbase.c @@ -28,7 +28,7 @@ void VG_(exit_now)( Int status ) #define CHECK(x) \ - if (!x) { fprintf(stderr, "failure: %s:%d\n", __FILE__, __LINE__); } + if (!(x)) { fprintf(stderr, "failure: %s:%d\n", __FILE__, __LINE__); } void test_VG_STREQ(void)