[ros-bugs] [Bug 3608] New: ASSERT_SRW_WAITBLOCK may evaluate to nothing
ReactOS.Bugzilla at www.reactos.org
ReactOS.Bugzilla at www.reactos.org
Wed Jul 30 01:52:55 CEST 2008
http://www.reactos.org/bugzilla/show_bug.cgi?id=3608
Summary: ASSERT_SRW_WAITBLOCK may evaluate to nothing
Product: ReactOS
Version: TRUNK
Platform: VirtualBox
OS/Version: ReactOS
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: Patches
AssignedTo: ros-bugs at reactos.org
ReportedBy: mslomp at linuxmail.org
QAContact: ros-bugs at reactos.org
CC: mslomp at linuxmail.org
target: lib/rtl/srw.c
The patch below casts the ASSERT_SRW_WAITBLOCK macro to void, to prevent a
no-effect expansion due to the strict handling of (variadic or not) macros in
recent versions of GCC.
Notice that build runs fine with -Wno-unused, but I think this goes against the
purposes of -Werror in the build flags (and in fact, GCC 4.3+ break with this
warning). This "problem" is nothing critical, but it will avoid future
headhaches.
Marcelo A. B. Slomp
Index: lib/rtl/srw.c
===================================================================
--- lib/rtl/srw.c (revision 34937)
+++ lib/rtl/srw.c (working copy)
@@ -91,7 +91,8 @@
/* This macro will cause the code to assert if compiled with a buggy
version of GCC that doesn't align the wait blocks properly on the stack! */
#define ASSERT_SRW_WAITBLOCK(ptr) \
- ASSERT(((ULONG_PTR)ptr & ((1 << RTL_SRWLOCK_BITS) - 1)) == 0)
+ (__attribute__((unused))void) \
+ ASSERT(((ULONG_PTR)ptr & ((1 << RTL_SRWLOCK_BITS) - 1)) == 0)
#else
#define ASSERT_SRW_WAITBLOCK(ptr)
#endif
--
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Ros-bugs
mailing list