Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2017 22:01:19 +0000 (UTC)
From:      Ryan Libby <rlibby@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320511 - head/sys/geom/virstor
Message-ID:  <201706302201.v5UM1JKR041789@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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(" ");						\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706302201.v5UM1JKR041789>