When building with clang, disable -Wunneeded-internal-declaration for

several sys/cam/ctl files, since these get the following warnings:

In file included from sys/cam/ctl/ctl_backend.c:60:
sys/cam/ctl/ctl_private.h:300:30: error: variable 'page_index_template' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static struct ctl_page_index page_index_template[] = {
                             ^

These warnings are tricky to fix without a lot of overhaul, and they are
harmless, so disable them for now.

MFC after:	1 week
This commit is contained in:
dim 2012-02-21 20:55:43 +00:00
parent 05b0baa9d7
commit 97a585876e
2 changed files with 11 additions and 5 deletions

View File

@ -116,16 +116,21 @@ cam/scsi/scsi_cd.c optional cd
cam/scsi/scsi_ch.c optional ch
cam/ata/ata_da.c optional ada | da
cam/ctl/ctl.c optional ctl
cam/ctl/ctl_backend.c optional ctl
cam/ctl/ctl_backend.c optional ctl \
compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}"
cam/ctl/ctl_backend_block.c optional ctl
cam/ctl/ctl_backend_ramdisk.c optional ctl
cam/ctl/ctl_cmd_table.c optional ctl
cam/ctl/ctl_frontend.c optional ctl
cam/ctl/ctl_cmd_table.c optional ctl \
compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}"
cam/ctl/ctl_frontend.c optional ctl \
compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}"
cam/ctl/ctl_frontend_cam_sim.c optional ctl
cam/ctl/ctl_frontend_internal.c optional ctl
cam/ctl/ctl_frontend_internal.c optional ctl \
compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}"
cam/ctl/ctl_mem_pool.c optional ctl
cam/ctl/ctl_scsi_all.c optional ctl
cam/ctl/ctl_error.c optional ctl
cam/ctl/ctl_error.c optional ctl \
compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}"
cam/ctl/ctl_util.c optional ctl
cam/ctl/scsi_ctl.c optional ctl
cam/scsi/scsi_da.c optional da

View File

@ -22,6 +22,7 @@ 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
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.