1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

Work around the following clang warning in mps(4):

sys/dev/mps/mps_sas.c:861:1: error: function 'mpssas_discovery_timeout' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
  mpssas_discovery_timeout(void *data)
  ^

Because the driver is obtained from upstream, we don't want to modify
it; just silence the warning instead, it is harmless.

MFC after:	3 days
This commit is contained in:
Dimitry Andric 2012-03-23 11:35:01 +00:00
parent 6c11edf6e8
commit 3b5683fce6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=233354
3 changed files with 6 additions and 1 deletions

View File

@ -1480,7 +1480,8 @@ dev/mps/mps.c optional mps
dev/mps/mps_config.c optional mps dev/mps/mps_config.c optional mps
dev/mps/mps_mapping.c optional mps dev/mps/mps_mapping.c optional mps
dev/mps/mps_pci.c optional mps pci 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_sas_lsi.c optional mps
dev/mps/mps_table.c optional mps dev/mps/mps_table.c optional mps
dev/mps/mps_user.c optional mps dev/mps/mps_user.c optional mps

View File

@ -23,6 +23,7 @@ NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow
NO_WUNUSED_VALUE= -Wno-unused-value NO_WUNUSED_VALUE= -Wno-unused-value
NO_WSELF_ASSIGN= -Wno-self-assign NO_WSELF_ASSIGN= -Wno-self-assign
NO_WFORMAT_SECURITY= -Wno-format-security 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 # 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 # enough to error out the whole kernel build. Display them anyway, so there is
# some incentive to fix them eventually. # some incentive to fix them eventually.

View File

@ -11,3 +11,6 @@ SRCS+= device_if.h bus_if.h pci_if.h
#CFLAGS += -DMPS_DEBUG #CFLAGS += -DMPS_DEBUG
.include <bsd.kmod.mk> .include <bsd.kmod.mk>
CWARNFLAGS.mps_sas.c= ${NO_WUNNEEDED_INTERNAL_DECL}
CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}