Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Feb 2022 18:48:36 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 87c5d39f77bc - main - iwlwifi: Disable -Wformat when building with GCC.
Message-ID:  <202202031848.213ImaXu074261@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=87c5d39f77bc8c38738a6dc200f711f4418c5018

commit 87c5d39f77bc8c38738a6dc200f711f4418c5018
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-02-03 18:48:18 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-02-03 18:48:18 +0000

    iwlwifi: Disable -Wformat when building with GCC.
    
    GCC's -Wformat complains about NULL format strings passed to
    iwl_fw_dbg_collect_trig (though the function handles NULL format
    strings).  Curious that upstream iwlwifi in Linux is built with GCC
    and explicitly opts into this warning via the __printf() attribute.
    
    Reviewed by:    bz
    Differential Revision:  https://reviews.freebsd.org/D34146
---
 sys/modules/iwlwifi/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/modules/iwlwifi/Makefile b/sys/modules/iwlwifi/Makefile
index 9eadae0bbbc1..cbf03bf2ee48 100644
--- a/sys/modules/iwlwifi/Makefile
+++ b/sys/modules/iwlwifi/Makefile
@@ -57,4 +57,7 @@ CFLAGS+=	-DCONFIG_IWLWIFI_DEVICE_TRACING=1
 #CFLAGS+=	-DCONFIG_THERMAL=1
 #CFLAGS+=	-DCONFIG_EFI=1
 
+# GCC warns about NULL format strings passed to iwl_fw_dbg_collect_trig
+CWARNFLAGS.gcc+= -Wno-format
+
 .include <bsd.kmod.mk>



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