From owner-svn-src-head@freebsd.org Fri Jun 30 22:01:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FC95D9B8CC; Fri, 30 Jun 2017 22:01:20 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E34E07E740; Fri, 30 Jun 2017 22:01:19 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UM1Jrq041790; Fri, 30 Jun 2017 22:01:19 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UM1JKR041789; Fri, 30 Jun 2017 22:01:19 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201706302201.v5UM1JKR041789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 30 Jun 2017 22:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320511 - head/sys/geom/virstor X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/geom/virstor X-SVN-Commit-Revision: 320511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 22:01:20 -0000 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(" "); \