[Mesa-dev] [PATCH] amd/addrlib: fix optimized build warnings

Grazvydas Ignotas notasas at gmail.com
Sun Apr 2 17:22:21 UTC 2017


All the -Wunused-but-set-variable ones.
Found a way to do it with a oneliner.

Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
---
no commit access (currently pending)

 src/amd/addrlib/core/addrcommon.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/addrlib/core/addrcommon.h b/src/amd/addrlib/core/addrcommon.h
index 3911d79..66424a8 100644
--- a/src/amd/addrlib/core/addrcommon.h
+++ b/src/amd/addrlib/core/addrcommon.h
@@ -66,11 +66,11 @@
 // Debug assertions used in AddrLib
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 #if defined(_WIN32) && (_MSC_VER >= 1400)
     #define ADDR_ANALYSIS_ASSUME(expr) __analysis_assume(expr)
 #else
-    #define ADDR_ANALYSIS_ASSUME(expr) do { } while (0)
+    #define ADDR_ANALYSIS_ASSUME(expr) do { (void)(expr); } while (0)
 #endif
 
 #if DEBUG
     #define ADDR_ASSERT(__e)                                \
         do {                                                    \
-- 
2.7.4



More information about the mesa-dev mailing list