git: b9cab0f39cc8 - stable/13 - iwlwifi: Disable -Wformat when building with GCC.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Tue, 24 Jan 2023 04:46:34 UTC
The branch stable/13 has been updated by jhb:

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

commit b9cab0f39cc88554bfd6338ee1b1a91227334856
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-02-03 18:48:18 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-01-24 04:33:49 +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
    
    (cherry picked from commit 87c5d39f77bc8c38738a6dc200f711f4418c5018)
---
 sys/modules/iwlwifi/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/modules/iwlwifi/Makefile b/sys/modules/iwlwifi/Makefile
index 831fe97847a5..5cf652267354 100644
--- a/sys/modules/iwlwifi/Makefile
+++ b/sys/modules/iwlwifi/Makefile
@@ -63,4 +63,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>