Author: dim
Date: Tue Feb 21 20:55:43 2012
New Revision: 231978
URL: http://svn.freebsd.org/changeset/base/231978

Log:
  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

Modified:
  head/sys/conf/files
  head/sys/conf/kern.mk

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files Tue Feb 21 20:29:38 2012        (r231977)
+++ head/sys/conf/files Tue Feb 21 20:55:43 2012        (r231978)
@@ -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

Modified: head/sys/conf/kern.mk
==============================================================================
--- head/sys/conf/kern.mk       Tue Feb 21 20:29:38 2012        (r231977)
+++ head/sys/conf/kern.mk       Tue Feb 21 20:55:43 2012        (r231978)
@@ -22,6 +22,7 @@ NO_WSHIFT_COUNT_NEGATIVE=     -Wno-shift-cou
 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.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to