diff options
author | dim <dim@FreeBSD.org> | 2011-12-30 01:54:45 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-12-30 01:54:45 +0000 |
commit | adbe8c42f79bf4991f2e9bb6d301e3f99a44f923 (patch) | |
tree | ce03deb84259c3d8bb7412ac9228596346d53a8d | |
parent | cb0679d00b9b71ec69cd51a6cc653cbdd191c0d1 (diff) | |
download | FreeBSD-src-adbe8c42f79bf4991f2e9bb6d301e3f99a44f923.zip FreeBSD-src-adbe8c42f79bf4991f2e9bb6d301e3f99a44f923.tar.gz |
For several files in sys/dev/drm, disable -Wunused-value when building
with clang. There are several macros in these files that return values,
and in some cases nothing is done with them, but it is completely
harmless. For some other files, also disable -Wconstant-conversion,
since that triggers a false positive with the DMA_BIT_MASK() macro.
MFC after: 1 week
-rw-r--r-- | sys/conf/files | 11 | ||||
-rw-r--r-- | sys/conf/kern.mk | 1 | ||||
-rw-r--r-- | sys/modules/drm/r128/Makefile | 4 | ||||
-rw-r--r-- | sys/modules/drm/radeon/Makefile | 4 | ||||
-rw-r--r-- | sys/modules/drm/via/Makefile | 4 |
5 files changed, 20 insertions, 4 deletions
diff --git a/sys/conf/files b/sys/conf/files index f2d137e..3b04672 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -992,15 +992,18 @@ dev/drm/mga_irq.c optional mgadrm dev/drm/mga_state.c optional mgadrm \ compile-with "${NORMAL_C} -finline-limit=13500" dev/drm/mga_warp.c optional mgadrm -dev/drm/r128_cce.c optional r128drm +dev/drm/r128_cce.c optional r128drm \ + compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}" dev/drm/r128_drv.c optional r128drm dev/drm/r128_irq.c optional r128drm dev/drm/r128_state.c optional r128drm \ - compile-with "${NORMAL_C} -finline-limit=13500" + compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} -finline-limit=13500" dev/drm/r300_cmdbuf.c optional radeondrm dev/drm/r600_blit.c optional radeondrm -dev/drm/r600_cp.c optional radeondrm -dev/drm/radeon_cp.c optional radeondrm +dev/drm/r600_cp.c optional radeondrm \ + compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}" +dev/drm/radeon_cp.c optional radeondrm \ + compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}" dev/drm/radeon_cs.c optional radeondrm dev/drm/radeon_drv.c optional radeondrm dev/drm/radeon_irq.c optional radeondrm diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 0410b24..7e37765f 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -20,6 +20,7 @@ NO_WCONSTANT_CONVERSION= -Wno-constant-conversion 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 # 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/drm/r128/Makefile b/sys/modules/drm/r128/Makefile index e80a0d8..215397a 100644 --- a/sys/modules/drm/r128/Makefile +++ b/sys/modules/drm/r128/Makefile @@ -6,3 +6,7 @@ SRCS = r128_cce.c r128_drv.c r128_irq.c r128_state.c SRCS +=device_if.h bus_if.h pci_if.h opt_drm.h .include <bsd.kmod.mk> + +CWARNFLAGS.r128_cce.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.r128_state.c= ${NO_WUNUSED_VALUE} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} diff --git a/sys/modules/drm/radeon/Makefile b/sys/modules/drm/radeon/Makefile index 72c364b..d6413c4 100644 --- a/sys/modules/drm/radeon/Makefile +++ b/sys/modules/drm/radeon/Makefile @@ -7,3 +7,7 @@ SRCS = r300_cmdbuf.c r600_blit.c r600_cp.c radeon_cp.c radeon_cs.c \ SRCS +=device_if.h bus_if.h pci_if.h opt_drm.h .include <bsd.kmod.mk> + +CWARNFLAGS.r600_cp.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.radeon_cp.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} diff --git a/sys/modules/drm/via/Makefile b/sys/modules/drm/via/Makefile index 96d9fd7..c9b4c54 100644 --- a/sys/modules/drm/via/Makefile +++ b/sys/modules/drm/via/Makefile @@ -20,3 +20,7 @@ opt_drm.h: echo $(DRM_LINUX_OPT) >> opt_drm.h .include <bsd.kmod.mk> + +CWARNFLAGS.via_dma.c= ${NO_WUNUSED_VALUE} +CWARNFLAGS.via_dmablit.c= ${NO_WUNUSED_VALUE} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} |