diff --git a/sys/conf/files b/sys/conf/files index ce2ac725866d..bb70b43ee6cc 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1480,7 +1480,8 @@ dev/mps/mps.c optional mps dev/mps/mps_config.c optional mps dev/mps/mps_mapping.c optional mps dev/mps/mps_pci.c optional mps pci -dev/mps/mps_sas.c optional mps +dev/mps/mps_sas.c optional mps \ + compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" dev/mps/mps_sas_lsi.c optional mps dev/mps/mps_table.c optional mps dev/mps/mps_user.c optional mps diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 1dfc9fbe674a..5cb718ede462 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -23,6 +23,7 @@ NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow NO_WUNUSED_VALUE= -Wno-unused-value NO_WSELF_ASSIGN= -Wno-self-assign NO_WFORMAT_SECURITY= -Wno-format-security +NO_WUNNEEDED_INTERNAL_DECL= -Wno-unneeded-internal-declaration # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. diff --git a/sys/modules/mps/Makefile b/sys/modules/mps/Makefile index b8589647fef8..d8f82c6a98e3 100644 --- a/sys/modules/mps/Makefile +++ b/sys/modules/mps/Makefile @@ -11,3 +11,6 @@ SRCS+= device_if.h bus_if.h pci_if.h #CFLAGS += -DMPS_DEBUG .include + +CWARNFLAGS.mps_sas.c= ${NO_WUNNEEDED_INTERNAL_DECL} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}