8714 sgs: '__*_msg' defined but not used

Review Request #671 — Created Oct. 13, 2017 and submitted

tsoome
illumos-gate
8714
ff903b6...
general

XXX_msg.c generation should annotate with unused attribute

syminfo_msg.c:115:19: error: '__syminfo_msg' defined but not used [-Werror=unused-const-variable=]
static const char __syminfo_msg[3771] = {
^~~~~
cc1: all warnings being treated as errors



richlowe
  1. 
      
  2. usr/src/cmd/sgs/tools/common/sgsmsg.c (Diff revision 1)
     
     

    Is there any reason we may want to do the _unused thing and include the header, instead?

    If not, looks good

    1. it is a bit more complicated because we have (generated) files like:

      tsoome@beastie:/code/illumos-gate/usr/src/cmd/sgs$ cat  ./libconv/i386/c_literal_msg.c
      
      const char __sgs_msg_libconv_c_literal[7] __attribute__((unused)) = { 
      /*    0 */ 0x00,  0x5c,  0x25,  0x30,  0x33,  0x6f,  0x00 };
      tsoome@beastie:/code/illumos-gate/usr/src/cmd/sgs$
      

      meaning that for some reason, for some files we are not generating full file with prologue.

  3. 
      
richlowe
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...