Project

General

Profile

Bug #13799

Updated by Toomas Soome 9 months ago

Build errors with gcc 10 and gcc 7 and earlier: 
 <pre> 
     collect.c: In function 'collect': 
     collect.c:103: error: 'sigpipe' may be used uninitialized in this function [-Wuninitialized] 
     collect.c:103: error: 'sigint' may be used uninitialized in this function [-Wuninitialized] 
     *** Error code 1 
     dmake: Fatal error: Command failed for target `collect.o' 
     Current working directory /code/illumos-gate/usr/src/cmd/mailx 
    
     cmd4.c: In function 'dopipe': 
     cmd4.c:64: error: 'sigint' may be used uninitialized in this function [-Wuninitialized] 
     cmd4.c:64: error: 'sigpipe' may be used uninitialized in this function [-Wuninitialized] 
     *** Error code 1 
     dmake: Fatal error: Command failed for target `cmd4.o' 
     Current working directory /code/illumos-gate/usr/src/cmd/mailx 
    
     cmd1.c: In function 'type1': 
     cmd1.c:445: error: 'sigint' may be used uninitialized in this function [-Wuninitialized] 
     cmd1.c:445: error: 'sigpipe' may be used uninitialized in this function [-Wuninitialized] 
     *** Error code 1 
     dmake: Fatal error: Command failed for target `cmd1.o' 
     Current working directory /code/illumos-gate/usr/src/cmd/mailx 
    
     quit.c: In function 'quit': 
     hdr/def.h:101:19: error: 'readstat' may be used uninitialized in this function [-Werror=maybe-uninitialized] 
      #define fclose(s) my_fclose(s) 
                        ^~~~~~~~~ 
     quit.c:66:36: note: 'readstat' was declared here 
       FILE *ibuf = NULL, *obuf, *fbuf, *readstat; 
                                         ^~~~~~~~ 
     cc1: all warnings being treated as errors 
     *** Error code 1 
     dmake: Fatal error: Command failed for target `quit.o' 
     Current working directory /code/illumos-gate/usr/src/cmd/mailx 
    
     collect.c:788:3: error: 'sigpipe' may be used uninitialized in this function [-Werror=maybe-uninitialized] 
        sigset(SIGPIPE, sigpipe); 
        ^~~~~~~~~~~~~~~~~~~~~~~~ 
     collect.c:789:3: error: 'sigint' may be used uninitialized in this function [-Werror=maybe-uninitialized] 
        sigset(SIGINT, sigint); 
        ^~~~~~~~~~~~~~~~~~~~~~ 
     cc1: all warnings being treated as errors 
     *** Error code 1 
     dmake: Fatal error: Command failed for target `collect.o' 
     Current working directory /code/illumos-gate/usr/src/cmd/mailx 
 </pre> 

 Testing done: build/install/boot

Back