From: Ivo Raisr Date: Thu, 18 Jan 2018 16:20:02 +0000 (+0100) Subject: Enable -Wlogical-op for Valgrind; fix an obvious typo. X-Git-Tag: VALGRIND_3_14_0~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f19a956e0a96b4f6b37c50b00ae24ecf09a7a3f5;p=thirdparty%2Fvalgrind.git Enable -Wlogical-op for Valgrind; fix an obvious typo. Fixes BZ#389065. Reported by: dcb314@hotmail.com --- diff --git a/Makefile.all.am b/Makefile.all.am index 2d698cf6cb..30e79dd565 100644 --- a/Makefile.all.am +++ b/Makefile.all.am @@ -113,6 +113,7 @@ AM_CFLAGS_BASE = \ @FLAG_W_FORMAT_SECURITY@ \ @FLAG_W_IGNORED_QUALIFIERS@ \ @FLAG_W_MISSING_PARAMETER_TYPE@ \ + @FLAG_W_LOGICAL_OP@ \ @FLAG_W_OLD_STYLE_DECLARATION@ \ @FLAG_FNO_STACK_PROTECTOR@ \ @FLAG_FSANITIZE@ \ diff --git a/NEWS b/NEWS index ac73ddee0b..ee853d55a8 100644 --- a/NEWS +++ b/NEWS @@ -86,6 +86,7 @@ where XXXXXX is the bug number as listed below. 386397 PPC64, valgrind truncates powerpc timebase to 32-bits. 387712 s390x cgijnl reports Conditional jump depends on uninitialised value 387773 .gnu_debugaltlink paths resolve relative to .debug file, not symlink +389065 valgrind meets gcc flag -Wlogical-op n-i-bz Fix missing workq_ops operations (macOS) n-i-bz fix bug in strspn replacement diff --git a/configure.ac b/configure.ac index 901c595021..98d7ac6e5b 100644 --- a/configure.ac +++ b/configure.ac @@ -2004,6 +2004,7 @@ AC_GCC_WARNING_SUBST([cast-qual], [FLAG_W_CAST_QUAL]) AC_GCC_WARNING_SUBST([old-style-declaration], [FLAG_W_OLD_STYLE_DECLARATION]) AC_GCC_WARNING_SUBST([ignored-qualifiers], [FLAG_W_IGNORED_QUALIFIERS]) AC_GCC_WARNING_SUBST([missing-parameter-type], [FLAG_W_MISSING_PARAMETER_TYPE]) +AC_GCC_WARNING_SUBST([logical-op], [FLAG_W_LOGICAL_OP]) # Does this compiler support -Wformat-security ? # Special handling is needed, because certain GCC versions require -Wformat diff --git a/coregrind/m_syswrap/syswrap-xen.c b/coregrind/m_syswrap/syswrap-xen.c index 1e374ab98d..54153ab1c7 100644 --- a/coregrind/m_syswrap/syswrap-xen.c +++ b/coregrind/m_syswrap/syswrap-xen.c @@ -1279,7 +1279,7 @@ PRE(domctl) switch (domctl->interface_version) { case 0x000000b: if (domctl->u.monitor_op_0000000b.op == VKI_XEN_DOMCTL_MONITOR_OP_ENABLE || - domctl->u.monitor_op_0000000b.op == VKI_XEN_DOMCTL_MONITOR_OP_ENABLE) { + domctl->u.monitor_op_0000000b.op == VKI_XEN_DOMCTL_MONITOR_OP_DISABLE) { switch (domctl->u.monitor_op_0000000b.event) { case VKI_XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG: __PRE_XEN_DOMCTL_READ(monitor_op, monitor_op_0000000b, u.mov_to_cr);