Print this page
make: fix GCC warnings

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/lib/mksh/misc.cc
          +++ new/usr/src/cmd/make/lib/mksh/misc.cc
↓ open down ↓ 61 lines elided ↑ open up ↑
  62   62   */
  63   63  
  64   64  /*
  65   65   * typedefs & structs
  66   66   */
  67   67  
  68   68  /*
  69   69   * Static variables
  70   70   */
  71   71  #ifdef SUN5_0
  72      -extern "C" void         (*sigivalue)(int) = SIG_DFL;
  73      -extern "C" void         (*sigqvalue)(int) = SIG_DFL;
  74      -extern "C" void         (*sigtvalue)(int) = SIG_DFL;
  75      -extern "C" void         (*sighvalue)(int) = SIG_DFL;
       72 +extern "C" {
       73 +        void            (*sigivalue)(int) = SIG_DFL;
       74 +        void            (*sigqvalue)(int) = SIG_DFL;
       75 +        void            (*sigtvalue)(int) = SIG_DFL;
       76 +        void            (*sighvalue)(int) = SIG_DFL;
       77 +}
  76   78  #else
  77   79  static  void            (*sigivalue)(int) = (void (*) (int)) SIG_DFL;
  78   80  static  void            (*sigqvalue)(int) = (void (*) (int)) SIG_DFL;
  79   81  static  void            (*sigtvalue)(int) = (void (*) (int)) SIG_DFL;
  80   82  static  void            (*sighvalue)(int) = (void (*) (int)) SIG_DFL;
  81   83  #endif
  82   84  
  83   85  long    getname_bytes_count = 0;
  84   86  long    getname_names_count = 0;
  85   87  long    getname_struct_count = 0;
↓ open down ↓ 232 lines elided ↑ open up ↑
 318  320   *      Load the vector char_semantics[] with lexical markers
 319  321   *
 320  322   *      Parameters:
 321  323   *
 322  324   *      Global variables used:
 323  325   *              char_semantics  The vector of character semantics that we set
 324  326   */
 325  327  void
 326  328  setup_char_semantics(void)
 327  329  {
 328      -        char            *s;
      330 +        const char      *s;
 329  331          wchar_t         wc_buffer[1];
 330  332          int             entry;
 331  333  
 332  334          if (svr4) {
 333  335                  s = "@-";
 334  336          } else {
 335  337                  s = "=@-?!+";
 336  338          }
 337  339          for (s; MBTOWC(wc_buffer, s); s++) {
 338  340                  entry = get_char_semantics_entry(*wc_buffer);
↓ open down ↓ 67 lines elided ↑ open up ↑
 406  408   *      fatal_mksh(format, args...)
 407  409   *
 408  410   *      Print a message and die
 409  411   *
 410  412   *      Parameters:
 411  413   *              format          printf type format string
 412  414   *              args            Arguments to match the format
 413  415   */
 414  416  /*VARARGS*/
 415  417  void
 416      -fatal_mksh(char * message, ...)
      418 +fatal_mksh(const char *message, ...)
 417  419  {
 418  420          va_list args;
 419  421          char    *buf = static_buf;
 420  422          char    *mksh_fat_err = catgets(libmksdmsi18n_catd, 1, 128, "mksh: Fatal error: ");
 421  423          char    *cur_wrk_dir = catgets(libmksdmsi18n_catd, 1, 129, "Current working directory: ");
 422  424          int     mksh_fat_err_len = strlen(mksh_fat_err);
 423  425  
 424  426          va_start(args, message);
 425  427          (void) fflush(stdout);
 426  428          (void) strcpy(buf, mksh_fat_err);
↓ open down ↓ 34 lines elided ↑ open up ↑
 461  463  
 462  464  /*
 463  465   *      fatal_reader_mksh(format, args...)
 464  466   *
 465  467   *      Parameters:
 466  468   *              format          printf style format string
 467  469   *              args            arguments to match the format
 468  470   */
 469  471  /*VARARGS*/
 470  472  void
 471      -fatal_reader_mksh(char * pattern, ...)
      473 +fatal_reader_mksh(const char * pattern, ...)
 472  474  {
 473  475          va_list args;
 474  476          char    message[1000];
 475  477  
 476  478          va_start(args, pattern);
 477  479  /*
 478  480          if (file_being_read != NULL) {
 479  481                  WCSTOMBS(mbs_buffer, file_being_read);
 480  482                  if (line_number != 0) {
 481  483                          (void) sprintf(message,
↓ open down ↓ 693 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX