Author: rlibby
Date: Fri Jun 30 22:01:18 2017
New Revision: 320511
URL: https://svnweb.freebsd.org/changeset/base/320511

Log:
  g_virstor.h: macro parenthesization
  
  Build with gcc -Wint-in-bool-context revealed a macro parenthesization
  error (invoking LOG_MSG with a ternary expression for lvl).
  
  Reviewed by:  markj
  Approved by:  markj (mentor)
  Sponsored by: Dell EMC Isilon
  Differential revision:        https://reviews.freebsd.org/D11411

Modified:
  head/sys/geom/virstor/g_virstor.h

Modified: head/sys/geom/virstor/g_virstor.h
==============================================================================
--- head/sys/geom/virstor/g_virstor.h   Fri Jun 30 21:32:48 2017        
(r320510)
+++ head/sys/geom/virstor/g_virstor.h   Fri Jun 30 22:01:18 2017        
(r320511)
@@ -48,8 +48,8 @@ struct virstor_map_entry {
 #define        LOG_MSG(lvl, ...)       do {                                    
\
         if (g_virstor_debug >= (lvl)) {                                        
\
                 printf("GEOM_" G_VIRSTOR_CLASS_NAME);                  \
-                if (lvl > 0)                                           \
-                        printf("[%u]", lvl);                           \
+                if ((lvl) > 0)                                         \
+                        printf("[%u]", (lvl));                         \
                 printf(": ");                                          \
                 printf(__VA_ARGS__);                                   \
                 printf("\n");                                          \
@@ -60,8 +60,8 @@ struct virstor_map_entry {
 #define        LOG_REQ(lvl, bp, ...)  do {                                     
\
         if (g_virstor_debug >= (lvl)) {                                        
\
                 printf("GEOM_" G_VIRSTOR_CLASS_NAME);                  \
-                if (lvl > 0)                                           \
-                        printf("[%u]", lvl);                           \
+                if ((lvl) > 0)                                         \
+                        printf("[%u]", (lvl));                         \
                 printf(": ");                                          \
                 printf(__VA_ARGS__);                                   \
                 printf(" ");                                           \
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to