diff options
author | dim <dim@FreeBSD.org> | 2011-12-30 13:16:59 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-12-30 13:16:59 +0000 |
commit | a15eaa46ba0aac83cf6e919b45bb5fe91ad4145e (patch) | |
tree | ac52d2fd945773a05e42149c733bc2c4a8147cbf | |
parent | bf1efdbdcd58706a3ec26b3a10d7522a26a246a6 (diff) | |
download | FreeBSD-src-a15eaa46ba0aac83cf6e919b45bb5fe91ad4145e.zip FreeBSD-src-a15eaa46ba0aac83cf6e919b45bb5fe91ad4145e.tar.gz |
Disable several instances instances of clang's -Wself-assign warning.
All of these are harmless, and are in fact used to shut up warnings from
lint.
While here, remove -Wno-missing-prototypes from the xfs module
Makefile, as I could not reproduce those warnings either with gcc or
clang.
MFC after: 1 week
-rw-r--r-- | sys/conf/files | 32 | ||||
-rw-r--r-- | sys/conf/kern.mk | 1 | ||||
-rw-r--r-- | sys/modules/ipfilter/Makefile | 5 | ||||
-rw-r--r-- | sys/modules/nxge/Makefile | 10 | ||||
-rw-r--r-- | sys/modules/xfs/Makefile | 7 |
5 files changed, 38 insertions, 17 deletions
diff --git a/sys/conf/files b/sys/conf/files index 3b04672..2f8b5f6 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -304,7 +304,7 @@ contrib/dev/acpica/utilities/utxface.c optional acpi contrib/dev/acpica/utilities/utxferror.c optional acpi #contrib/dev/acpica/utilities/utxfmutex.c optional acpi contrib/ipfilter/netinet/fil.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_fil_freebsd.c optional ipfilter inet \ @@ -316,11 +316,11 @@ contrib/ipfilter/netinet/ip_log.c optional ipfilter inet \ contrib/ipfilter/netinet/ip_nat.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_proxy.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \ - compile-with "${NORMAL_C} -Wno-error -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-error -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \ @@ -1522,17 +1522,25 @@ dev/ncv/ncr53c500.c optional ncv dev/ncv/ncr53c500_pccard.c optional ncv pccard dev/netmap/netmap.c optional netmap dev/nge/if_nge.c optional nge -dev/nxge/if_nxge.c optional nxge -dev/nxge/xgehal/xgehal-device.c optional nxge +dev/nxge/if_nxge.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" +dev/nxge/xgehal/xgehal-device.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nxge/xgehal/xgehal-mm.c optional nxge dev/nxge/xgehal/xge-queue.c optional nxge -dev/nxge/xgehal/xgehal-driver.c optional nxge -dev/nxge/xgehal/xgehal-ring.c optional nxge -dev/nxge/xgehal/xgehal-channel.c optional nxge -dev/nxge/xgehal/xgehal-fifo.c optional nxge -dev/nxge/xgehal/xgehal-stats.c optional nxge +dev/nxge/xgehal/xgehal-driver.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" +dev/nxge/xgehal/xgehal-ring.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" +dev/nxge/xgehal/xgehal-channel.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" +dev/nxge/xgehal/xgehal-fifo.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" +dev/nxge/xgehal/xgehal-stats.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nxge/xgehal/xgehal-config.c optional nxge -dev/nxge/xgehal/xgehal-mgmt.c optional nxge +dev/nxge/xgehal/xgehal-mgmt.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nmdm/nmdm.c optional nmdm dev/nsp/nsp.c optional nsp dev/nsp/nsp_pccard.c optional nsp pccard @@ -3478,7 +3486,7 @@ gnu/fs/xfs/FreeBSD/xfs_sysctl.c optional xfs \ gnu/fs/xfs/FreeBSD/xfs_fs_subr.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_ioctl.c optional xfs \ - compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/support/debug.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/support/ktrace.c optional xfs \ diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 7e37765f..d561aae 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -21,6 +21,7 @@ NO_WARRAY_BOUNDS= -Wno-array-bounds NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow NO_WUNUSED_VALUE= -Wno-unused-value +NO_WSELF_ASSIGN= -Wno-self-assign # 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/ipfilter/Makefile b/sys/modules/ipfilter/Makefile index 9cfb0f6..db780e9 100644 --- a/sys/modules/ipfilter/Makefile +++ b/sys/modules/ipfilter/Makefile @@ -26,3 +26,8 @@ CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DIPFILTER_LOG -DIPFILTER_LOOKUP # .include <bsd.kmod.mk> + +CWARNFLAGS.fil.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.ip_proxy.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.ip_lookup.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} diff --git a/sys/modules/nxge/Makefile b/sys/modules/nxge/Makefile index 4994b90..a21239e 100644 --- a/sys/modules/nxge/Makefile +++ b/sys/modules/nxge/Makefile @@ -39,3 +39,13 @@ SRCS+= xgehal-mgmt.c SRCS+= device_if.h bus_if.h pci_if.h .include <bsd.kmod.mk> + +CWARNFLAGS.if_nxge.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-device.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-driver.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-ring.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-channel.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-fifo.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-stats.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-mgmt.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} diff --git a/sys/modules/xfs/Makefile b/sys/modules/xfs/Makefile index e713b05..7135019 100644 --- a/sys/modules/xfs/Makefile +++ b/sys/modules/xfs/Makefile @@ -86,8 +86,5 @@ CFLAGS+= -I${.CURDIR}/../../gnu/fs/xfs/FreeBSD \ -I${.CURDIR}/../../gnu/fs/xfs/FreeBSD/support \ -I${.CURDIR}/../../gnu/fs/xfs -# -# XFS sources trigger missing-prototypes warnings. -# Disable them here. -# -CWARNFLAGS+= -Wno-missing-prototypes +CWARNFLAGS.xfs_ioctl.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} |