Actions
Bug #13629
closednxge: build errors with gcc 10
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
Build errors with gcc 10:
../../common/io/nxge/nxge_fflp.c: In function 'nxge_fill_tcam_entry_udp': ../../common/io/nxge/nxge_fflp.c:912:14: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 912 | fspec_key = (udpip4_spec_t *)&flow_spec->uh.udpip4spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c:913:15: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 913 | fspec_mask = (udpip4_spec_t *)&flow_spec->um.udpip4spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_fill_tcam_entry_udp_ipv6': ../../common/io/nxge/nxge_fflp.c:940:14: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 940 | fspec_key = (udpip6_spec_t *)&flow_spec->uh.udpip6spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c:941:15: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 941 | fspec_mask = (udpip6_spec_t *)&flow_spec->um.udpip6spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_fill_tcam_entry_tcp': ../../common/io/nxge/nxge_fflp.c:972:14: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 972 | fspec_key = (tcpip4_spec_t *)&flow_spec->uh.tcpip4spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c:973:15: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 973 | fspec_mask = (tcpip4_spec_t *)&flow_spec->um.tcpip4spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_fill_tcam_entry_sctp': ../../common/io/nxge/nxge_fflp.c:999:14: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 999 | fspec_key = (tcpip4_spec_t *)&flow_spec->uh.tcpip4spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c:1000:15: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1000 | fspec_mask = (tcpip4_spec_t *)&flow_spec->um.tcpip4spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_fill_tcam_entry_tcp_ipv6': ../../common/io/nxge/nxge_fflp.c:1026:14: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1026 | fspec_key = (tcpip6_spec_t *)&flow_spec->uh.tcpip6spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c:1027:15: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1027 | fspec_mask = (tcpip6_spec_t *)&flow_spec->um.tcpip6spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_fill_tcam_entry_sctp_ipv6': ../../common/io/nxge/nxge_fflp.c:1059:14: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1059 | fspec_key = (tcpip6_spec_t *)&flow_spec->uh.tcpip6spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c:1060:15: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1060 | fspec_mask = (tcpip6_spec_t *)&flow_spec->um.tcpip6spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_fill_tcam_entry_ah_esp': ../../common/io/nxge/nxge_fflp.c:1092:14: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1092 | fspec_key = (ahip4_spec_t *)&flow_spec->uh.ahip4spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c:1093:15: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1093 | fspec_mask = (ahip4_spec_t *)&flow_spec->um.ahip4spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_fill_tcam_entry_ah_esp_ipv6': ../../common/io/nxge/nxge_fflp.c:1126:14: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1126 | fspec_key = (ahip6_spec_t *)&flow_spec->uh.ahip6spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c:1127:15: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1127 | fspec_mask = (ahip6_spec_t *)&flow_spec->um.ahip6spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_fill_tcam_entry_ip_usr': ../../common/io/nxge/nxge_fflp.c:1163:14: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1163 | fspec_key = (ip_user_spec_t *)&flow_spec->uh.ip_usr_spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c:1164:15: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1164 | fspec_mask = (ip_user_spec_t *)&flow_spec->um.ip_usr_spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_add_tcam_entry': ../../common/io/nxge/nxge_fflp.c:1304:27: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1304 | ip_user_spec_t *uspec = &flow_spec->uh.ip_usr_spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c:1305:27: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 1305 | ip_user_spec_t *umask = &flow_spec->um.ip_usr_spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_get_tcam_entry': ../../common/io/nxge/nxge_fflp.c:2470:15: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 2470 | fspec_key = (tcpip4_spec_t *)&fspec->uh.tcpip4spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c:2471:16: error: taking address of packed member of 'struct flow_spec_s' may result in an unaligned pointer value [-Werror=address-of-packed-member] 2471 | fspec_mask = (tcpip4_spec_t *)&fspec->um.tcpip4spec; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_get_iptun_class': ../../common/io/nxge/nxge_fflp.c:2869:45: error: taking address of packed member of 'struct _iptun_cfg' may result in an unaligned pointer value [-Werror=address-of-packed-member] 2869 | &iptunp->l4b0_val, &iptunp->l4b0_mask, &iptunp->l4b23_val, | ^~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_add_tcam_entry': ../../common/io/nxge/nxge_fflp.c:1477:13: error: 'class' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1477 | rdc_grp = nxge_get_rdc_group(nxgep, | ^~~~~~~~~~~~~~~~~~~~~~~~~ 1478 | (tcam_class_t)class, flow_cookie); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../../common/io/nxge/nxge_fflp.c:30: ../../common/io/nxge/nxge_fflp.c: In function 'nxge_get_tcam_entry': ../../common/sys/nxge/nxge_flow.h:190:5: error: 'fspec_mask' may be used uninitialized in this function [-Werror=maybe-uninitialized] 190 | sp = port32 >> 16; \ | ^ ../../common/io/nxge/nxge_fflp.c:2444:18: note: 'fspec_mask' was declared here 2444 | tcpip4_spec_t *fspec_mask; | ^~~~~~~~~~ In file included from ../../common/io/nxge/nxge_fflp.c:30: ../../common/sys/nxge/nxge_flow.h:190:5: error: 'fspec_key' may be used uninitialized in this function [-Werror=maybe-uninitialized] 190 | sp = port32 >> 16; \ | ^ ../../common/io/nxge/nxge_fflp.c:2443:18: note: 'fspec_key' was declared here 2443 | tcpip4_spec_t *fspec_key; | ^~~~~~~~~ ../../common/io/nxge/nxge_fflp.c: In function 'nxge_add_iptun_class': ../../common/io/nxge/nxge_fflp.c:2716:10: error: 'class' may be used uninitialized in this function [-Werror=maybe-uninitialized] 2716 | rs = nxge_set_iptun_usr_cls_reg(nxgep, class, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2717 | iptunp); | ~~~~~~~ ../../common/io/nxge/nxge_send.c: In function 'nxge_start': ../../common/io/nxge/nxge_send.c:1085:3: error: 'nmp_lso_save' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1085 | freemsg(mp); | ^~~~~~~~~~~ ../../common/io/nxge/nxge_send.c:894:15: error: 'hdrp' may be used uninitialized in this function [-Werror=maybe-uninitialized] 894 | hdrp->value = tmp_len; | ~~~~~~~~~~~~^~~~~~~~~ ../../common/io/nxge/nxge_send.c:861:35: error: 'tx_msg_p' may be used uninitialized in this function [-Werror=maybe-uninitialized] 861 | pkt_len = tx_msg_p->tx_msg_size = min_len; | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ ../../common/io/nxge/nxge_fflp_hash.c: In function 'nxge_compute_h1_table1': ../../common/io/nxge/nxge_fflp_hash.c:374:9: error: 'crch1' may be used uninitialized in this function [-Werror=maybe-uninitialized] 374 | return (crch1); | ^ ../../common/io/nxge/nxge_virtual.c: In function 'nxge_ldgv_init_n2': ../../common/io/nxge/nxge_virtual.c:3120:26: error: assignment to 'nxge_ldv_intr_t' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(void *, void *)' {aka 'unsigned int (*)(void *, void *)'} [-Werror=incompatible-pointer-types] 3120 | ldvp->ldv_intr_handler = nxge_mac_intr; | ^ ../../common/io/nxge/nxge_virtual.c:3135:26: error: assignment to 'nxge_ldv_intr_t' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(void *, void *)' {aka 'unsigned int (*)(void *, void *)'} [-Werror=incompatible-pointer-types] 3135 | ldvp->ldv_intr_handler = nxge_mif_intr; | ^ ../../common/io/nxge/nxge_virtual.c:3162:26: error: assignment to 'nxge_ldv_intr_t' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(void *, void *)' {aka 'unsigned int (*)(void *, void *)'} [-Werror=incompatible-pointer-types] 3162 | ldvp->ldv_intr_handler = nxge_syserr_intr; | ^ ../../common/io/nxge/nxge_virtual.c:3182:29: error: assignment to 'nxge_ldv_intr_t' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(void *, void *)' {aka 'unsigned int (*)(void *, void *)'} [-Werror=incompatible-pointer-types] 3182 | sysldvp->ldv_intr_handler = nxge_syserr_intr; | ^ ../../common/io/nxge/nxge_virtual.c:3205:27: error: assignment to 'nxge_ldv_intr_t' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(void *, void *)' {aka 'unsigned int (*)(void *, void *)'} [-Werror=incompatible-pointer-types] 3205 | ldvp->ldv_intr_handler = nxge_rx_intr; | ^ ../../common/io/nxge/nxge_virtual.c:3240:27: error: assignment to 'nxge_ldv_intr_t' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(void *, void *)' {aka 'unsigned int (*)(void *, void *)'} [-Werror=incompatible-pointer-types] 3240 | ldvp->ldv_intr_handler = nxge_tx_intr; | ^ ../../common/io/nxge/nxge_virtual.c: In function 'nxge_ldgv_init': ../../common/io/nxge/nxge_virtual.c:3391:27: error: assignment to 'nxge_ldv_intr_t' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(void *, void *)' {aka 'unsigned int (*)(void *, void *)'} [-Werror=incompatible-pointer-types] 3391 | ldvp->ldv_intr_handler = nxge_rx_intr; | ^ ../../common/io/nxge/nxge_virtual.c:3412:27: error: assignment to 'nxge_ldv_intr_t' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(void *, void *)' {aka 'unsigned int (*)(void *, void *)'} [-Werror=incompatible-pointer-types] 3412 | ldvp->ldv_intr_handler = nxge_tx_intr; | ^ ../../common/io/nxge/nxge_virtual.c:3426:26: error: assignment to 'nxge_ldv_intr_t' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(void *, void *)' {aka 'unsigned int (*)(void *, void *)'} [-Werror=incompatible-pointer-types] 3426 | ldvp->ldv_intr_handler = nxge_mif_intr; | ^ ../../common/io/nxge/nxge_virtual.c:3438:26: error: assignment to 'nxge_ldv_intr_t' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(void *, void *)' {aka 'unsigned int (*)(void *, void *)'} [-Werror=incompatible-pointer-types] 3438 | ldvp->ldv_intr_handler = nxge_mac_intr; | ^ ../../common/io/nxge/nxge_virtual.c:3458:26: error: assignment to 'nxge_ldv_intr_t' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(void *, void *)' {aka 'unsigned int (*)(void *, void *)'} [-Werror=incompatible-pointer-types] 3458 | ldvp->ldv_intr_handler = nxge_syserr_intr; | ^ ../../common/io/nxge/nxge_virtual.c:3475:26: error: assignment to 'nxge_ldv_intr_t' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(void *, void *)' {aka 'unsigned int (*)(void *, void *)'} [-Werror=incompatible-pointer-types] 3475 | ldvp->ldv_intr_handler = nxge_syserr_intr; | ^ ../../common/io/nxge/nxge_virtual.c: In function 'nxge_cfg_verify_set_classify_prop': ../../common/io/nxge/nxge_virtual.c:1042:9: error: 'new_value' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1042 | uint_t new_value, cfg_value[MAX_SIBLINGS]; | ^~~~~~~~~ ../../common/io/nxge/nxge_virtual.c: In function 'nxge_init_mmac': ../../common/io/nxge/nxge_virtual.c:4073:16: error: 'alt_mac_ls4b' may be used uninitialized in this function [-Werror=maybe-uninitialized] 4073 | mac_addr.w0 = mmac_addr[2]; | ~~~~~~~~~~~~^~~~~~~~~~~~~~ ../../common/io/nxge/nxge_main.c: In function 'nxge_add_intrs_adv_type': ../../common/io/nxge/nxge_main.c:6204:21: error: 'inthandler' may be used uninitialized in this function [-Werror=maybe-uninitialized] 6204 | if ((ddi_status = ddi_intr_add_handler(intrp->htable[x], | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6205 | (ddi_intr_handler_t *)inthandler, arg1, arg2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_main.c: In function 'nxge_add_intrs_adv_type_fix': ../../common/io/nxge/nxge_main.c:6366:21: error: 'inthandler' may be used uninitialized in this function [-Werror=maybe-uninitialized] 6366 | if ((ddi_status = ddi_intr_add_handler(intrp->htable[x], | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6367 | (ddi_intr_handler_t *)inthandler, arg1, arg2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../../common/io/nxge/npi/npi.h:35, from ../../common/io/nxge/npi/npi_mac.h:35, from ../../common/sys/nxge/nxge_mac.h:36, from ../../common/sys/nxge/nxge_impl.h:90, from ../../common/io/nxge/nxge_txc.c:26: ../../common/io/nxge/nxge_txc.c: In function 'nxge_txc_handle_sys_errors': ../../common/sys/nxge/nxge_common_impl.h:145:32: error: 'err_portn' may be used uninitialized in this function [-Werror=maybe-uninitialized] 145 | #define NXGE_ERROR_MSG(params) nxge_debug_msg params | ^~~~~~~~~~~~~~ ../../common/io/nxge/nxge_txc.c:338:12: note: 'err_portn' was declared here 338 | uint8_t err_portn; | ^~~~~~~~~ ../../common/io/nxge/nxge_txdma.c: In function 'nxge_txdma_hw_mode': ../../common/io/nxge/nxge_txdma.c:1359:42: error: 'rs' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1359 | status = ((rs == NPI_SUCCESS) ? NXGE_OK : NXGE_ERROR | rs); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_txdma.c: In function 'nxge_map_txdma_channel_buf_ring': ../../common/io/nxge/nxge_txdma.c:2540:12: error: 'size' may be used uninitialized in this function [-Werror=maybe-uninitialized] 2540 | uint32_t size, bsize; | ^~~~ ../../common/io/nxge/nxge_txdma.c:2539:14: error: 'index' may be used uninitialized in this function [-Werror=maybe-uninitialized] 2539 | int i, j, index; | ^~~~~ ../../common/io/nxge/nxge_txdma.c:2536:15: error: 'tx_msg_ring' may be used uninitialized in this function [-Werror=maybe-uninitialized] 2536 | p_tx_msg_t tx_msg_ring; | ^~~~~~~~~~~ ../../common/io/nxge/nxge_txdma.c: In function 'nxge_txdma_fatal_err_recover': ../../common/io/nxge/nxge_txdma.c:3375:11: error: 'tx_mbox_p' may be used uninitialized in this function [-Werror=maybe-uninitialized] 3375 | status = nxge_enable_txdma_channel(nxgep, channel, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3376 | tx_ring_p, tx_mbox_p); | ~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_txdma.c: In function 'nxge_tx_port_fatal_err_recover': ../../common/io/nxge/nxge_txdma.c:3593:9: error: 'status' may be used uninitialized in this function [-Werror=maybe-uninitialized] 3593 | return (status); | ^ ../../common/io/nxge/nxge_rxdma.c: In function 'nxge_rxdma_hw_mode': ../../common/io/nxge/nxge_rxdma.c:1259:42: error: 'rs' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1259 | status = ((rs == NPI_SUCCESS) ? NXGE_OK : NXGE_ERROR | rs); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_rxdma.c: In function 'nxge_rxdma_hw_start': ../../common/io/nxge/nxge_rxdma.c:4167:28: error: 'rx_mbox_p' may be used uninitialized in this function [-Werror=maybe-uninitialized] 4167 | (p_rx_mbox_t)rx_mbox_p[i]); | ^ ../../common/io/nxge/npi/npi_txc.c: In function 'npi_txc_sf_states_get': ../../common/io/nxge/npi/npi_txc.c:985:19: error: 'd4.value' may be used uninitialized in this function [-Werror=maybe-uninitialized] 985 | states->d4.value = d4.value; | ~~~~~~~~~~~~~~~~~^~~~~~~~~~ ../../common/io/nxge/npi/npi_txc.c:984:19: error: 'd3.value' may be used uninitialized in this function [-Werror=maybe-uninitialized] 984 | states->d3.value = d3.value; | ~~~~~~~~~~~~~~~~~^~~~~~~~~~ ../../common/io/nxge/npi/npi_txc.c:983:19: error: 'd2.value' may be used uninitialized in this function [-Werror=maybe-uninitialized] 983 | states->d2.value = d2.value; | ~~~~~~~~~~~~~~~~~^~~~~~~~~~ ../../common/io/nxge/npi/npi_txc.c:982:19: error: 'd1.value' may be used uninitialized in this function [-Werror=maybe-uninitialized] 982 | states->d1.value = d1.value; | ~~~~~~~~~~~~~~~~~^~~~~~~~~~ ../../common/io/nxge/npi/npi_txc.c:981:19: error: 'd0.value' may be used uninitialized in this function [-Werror=maybe-uninitialized] 981 | states->d0.value = d0.value; | ~~~~~~~~~~~~~~~~~^~~~~~~~~~ In file included from ../../common/io/nxge/npi/npi.h:35, from ../../common/io/nxge/npi/npi_rxdma.h:33, from ../../common/io/nxge/npi/npi_rxdma.c:26: ../../common/io/nxge/npi/npi_rxdma.c: In function 'npi_rxdma_cfg_logical_page': ../../common/sys/nxge/nxge_common_impl.h:252:36: error: 'mask_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized] 252 | (uint64_t *)(NPI_REGP(npi_handle) + offset), data)) | ^ ../../common/io/nxge/npi/npi_rxdma.c:260:39: note: 'mask_offset' was declared here 260 | uint64_t value_offset, reloc_offset, mask_offset; | ^~~~~~~~~~~ In file included from ../../common/io/nxge/npi/npi.h:35, from ../../common/io/nxge/npi/npi_rxdma.h:33, from ../../common/io/nxge/npi/npi_rxdma.c:26: ../../common/sys/nxge/nxge_common_impl.h:252:36: error: 'reloc_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized] 252 | (uint64_t *)(NPI_REGP(npi_handle) + offset), data)) | ^ ../../common/io/nxge/npi/npi_rxdma.c:260:25: note: 'reloc_offset' was declared here 260 | uint64_t value_offset, reloc_offset, mask_offset; | ^~~~~~~~~~~~ In file included from ../../common/io/nxge/npi/npi.h:35, from ../../common/io/nxge/npi/npi_rxdma.h:33, from ../../common/io/nxge/npi/npi_rxdma.c:26: ../../common/sys/nxge/nxge_common_impl.h:252:36: error: 'value_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized] 252 | (uint64_t *)(NPI_REGP(npi_handle) + offset), data)) | ^ ../../common/io/nxge/npi/npi_rxdma.c:260:11: note: 'value_offset' was declared here 260 | uint64_t value_offset, reloc_offset, mask_offset; | ^~~~~~~~~~~~ ../../common/io/nxge/npi/npi_mac.c: In function 'npi_mac_port_attr': ../../common/io/nxge/npi/npi_mac.c:1018:21: error: 'max_fsize' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1018 | attrp->odata[1] = max_fsize; | ~~~~~~~~~~~~~~~~^~~~~~~~~~~ ../../common/io/nxge/nxge_hio.c: In function 'nxge_dci_map': ../../common/io/nxge/nxge_hio.c:225:29: error: 'set' may be used uninitialized in this function [-Werror=maybe-uninitialized] 225 | if ((1 << dc) & set->owned.map) { | ~~~~~~~~~~^~~~ In file included from ../../common/sys/nxge/nxge_impl.h:815, from ../../common/io/nxge/nxge_hio.c:38: ../../common/io/nxge/nxge_hio.c: In function 'nxge_grp_dc_add': ../../common/sys/nxge/nxge.h:549:39: error: 'set' may be used uninitialized in this function [-Werror=maybe-uninitialized] 549 | #define NXGE_DC_SET(map, channel) map |= (1 << channel) | ^~ ../../common/io/nxge/nxge_hio.c:430:18: note: 'set' was declared here 430 | nxge_grp_set_t *set; | ^~~ ../../common/io/nxge/nxge_intr.c: In function 'nxge_intr_add': ../../common/io/nxge/nxge_intr.c:106:17: error: 'inthandler' may be used uninitialized in this function [-Werror=maybe-uninitialized] 106 | if ((status2 = ddi_intr_add_handler(interrupts->htable[vector], | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 107 | (ddi_intr_handler_t *)inthandler, group->ldvp, nxge)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_intr.c: In function 'nxge_hio_intr_add': ../../common/io/nxge/nxge_intr.c:360:20: error: 'inthandler' may be used uninitialized in this function [-Werror=maybe-uninitialized] 360 | if ((ddi_status = ddi_intr_add_handler(interrupts->htable[vector], | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 361 | (ddi_intr_handler_t *)inthandler, group->ldvp, nxge)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../common/io/nxge/nxge_mac.c: In function 'nxge_bcm5464_link_led_off': ../../common/io/nxge/nxge_mac.c:8492:14: error: 'xcvr_portn' may be used uninitialized in this function [-Werror=maybe-uninitialized] 8492 | xcvr_portn += 2; | ~~~~~~~~~~~^~~~ ../../common/io/nxge/nxge_ndd.c: In function 'nxge_param_set_ip_usr': ../../common/io/nxge/nxge_ndd.c:1813:9: error: 'status' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1813 | return (status); | ^ cc1: all warnings being treated as errors
Testing done: build/install/boot.
Updated by Electric Monk over 2 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit e3d11eee533a61e848d8b250c8db63f7cb855904
commit e3d11eee533a61e848d8b250c8db63f7cb855904 Author: Toomas Soome <tsoome@me.com> Date: 2021-05-10T14:58:44.000Z 13629 nxge: build errors with gcc 10 Reviewed by: C Fraire <cfraire@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions