Project

General

Profile

Bug #13802

Updated by Toomas Soome 7 months ago

Build errors with gcc compilers: 
 <pre> 
     conditions.c: In function 'nwamd_check_conditions': 
     conditions.c:733:62: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] 
       733 |    if (activation_mode == NWAM_ACTIVATION_MODE_CONDITIONAL_ANY && ret) 
           |                                                                ^~ 
     cc1: all warnings being treated as errors 
    
     ncu_ip.c: In function 'nwamd_get_dhcpinfo_data': 
     ncu_ip.c:217:2: error: 'request' may be used uninitialized in this function [-Werror=maybe-uninitialized] 
       217 |    free(request); 
           |    ^~~~~~~~~~~~~ 
     ncu_ip.c: In function 'nwamd_ncu_handle_if_state_event': 
     ncu_ip.c:1153:8: error: 'static_addr' may be used uninitialized in this function [-Werror=maybe-uninitialized] 
      1153 |      if (!static_addr && family == AF_INET) { 
           |          ^~~~~~~~~~~~ 
     cc1: all warnings being treated as errors 
    
     ncu_ip.c:1095:50: error: 'stateless_running' may be used uninitialized in this function [-Werror=maybe-uninitialized] 
         } else if (u_if->nwamd_if_stateless_requested && 
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ 
             stateless_running) { 
             ~~~~~~~~~~~~~~~~~ 
     ncu_ip.c:1092:49: error: 'v6dhcp_running' may be used uninitialized in this function [-Werror=maybe-uninitialized] 
         } else if (u_if->nwamd_if_stateful_requested && 
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ 
             v6dhcp_running) { 
             ~~~~~~~~~~~~~~ 
     ncu_ip.c:1090:38: error: 'v4dhcp_running' may be used uninitialized in this function [-Werror=maybe-uninitialized] 
         if (u_if->nwamd_if_dhcp_requested && v4dhcp_running) { 
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 
     cc1: all warnings being treated as errors 
     *** Error code 1 
     dmake: Fatal error: Command failed for target `ncu_ip.o' 
     Current working directory /code/illumos-gate/usr/src/cmd/cmd-inet/lib/nwamd 
 </pre> 

 Testing done: build/install/boot, my OI test systems with nwam appear to behave as expected.

Back