Details
- 
    Bug 
- 
    Resolution: Fixed
- 
    Major 
- 
    None
- 
    None
- 
    None
- 
    Operating System: ReactOS 
 Platform: x86 Hardware
Description
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
Attachments
Issue Links
- blocks
- 
                    CORE-3615 GCC 4.3.2 compatiblity bug -         
- Resolved
 
-