Actions
Bug #8790
closedbnxe: variable set but not used
Start date:
2017-11-07
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
Debug build errors from gcc 6:
../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:144:11: error: variable 'val' set but not used [-Werror=unused-but-set-variable] u32_t val; ^~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c: In function 'lm_idle_chk': ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:335:41: error: variable 'chip_metal' set but not used [-Werror=unused-but-set-variable] u32_t i, val, val1, val2, chip_rev, chip_metal; ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c: In function 'lm_tcp_init_tcp_state_machine': ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:3060:33: error: variable 'lm_status' set but not used [-Werror=unused-but-set-variable] lm_status_t lm_status = LM_STATUS_SUCCESS; ^~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c: In function 'lm_tcp_free_tcp_resc': ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:4322:13: error: variable 'num_bytes_in_isles' set but not used [-Werror=unused-but-set-variable] u32_t num_bytes_in_isles = 0; ^~~~~~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c: In function 'lm_tcp_get_delegated': ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:5240:48: error: variable 'xst_toe' set but not used [-Werror=unused-but-set-variable] struct xstorm_toe_context_section * xst_toe = NULL; ^~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:5239:48: error: variable 'xag_toe' set but not used [-Werror=unused-but-set-variable] struct xstorm_toe_ag_context * xag_toe = NULL; ^~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:5238:48: error: variable 'cst_toe' set but not used [-Werror=unused-but-set-variable] struct cstorm_toe_st_context * cst_toe = NULL; ^~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:5237:48: error: variable 'ust_toe' set but not used [-Werror=unused-but-set-variable] struct ustorm_toe_st_context * ust_toe = NULL; ^~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c: In function '_lm_tcp_comp_upload_tcp_request': ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:5509:34: error: variable 'has_fin' set but not used [-Werror=unused-but-set-variable] u8_t has_fin = 0; ^~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c: In function 'lm_tcp_internal_query': ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:5755:19: error: variable 'num_tcps' set but not used [-Werror=unused-but-set-variable] u32_t status, num_tcps, i; ^~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c: In function 'lm_tcp_tx_complete_tcp_sp': ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:5835:34: error: variable 'snapshot_flags' set but not used [-Werror=unused-but-set-variable] u32_t sp_type,sp_flags,flags,snapshot_flags; ^~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:5835:28: error: variable 'flags' set but not used [-Werror=unused-but-set-variable] u32_t sp_type,sp_flags,flags,snapshot_flags; ^~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:5835:19: error: variable 'sp_flags' set but not used [-Werror=unused-but-set-variable] u32_t sp_type,sp_flags,flags,snapshot_flags; ^~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c: In function 'lm_tcp_rx_complete_tcp_sp': ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:5938:34: error: variable 'snapshot_flags' set but not used [-Werror=unused-but-set-variable] u32_t sp_type,sp_flags,flags,snapshot_flags; ^~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:5938:28: error: variable 'flags' set but not used [-Werror=unused-but-set-variable] u32_t sp_type,sp_flags,flags,snapshot_flags; ^~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4sp.c:5938:19: error: variable 'sp_flags' set but not used [-Werror=unused-but-set-variable] u32_t sp_type,sp_flags,flags,snapshot_flags; ^~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_dcbx.c:289:10: error: variable 'elink_status' set but not used [-Werror=unused-but-set-variable] u8_t elink_status = ELINK_STATUS_OK; ^~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_dcbx.c: In function 'lm_pfc_set_clc': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_dcbx.c:309:10: error: variable 'elink_status' set but not used [-Werror=unused-but-set-variable] u8_t elink_status = ELINK_STATUS_OK; ^~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_dcbx.c: In function 'lm_dcbx_init_lpme_set_params': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_dcbx.c:3675:17: error: variable 'lm_status' set but not used [-Werror=unused-but-set-variable] lm_status_t lm_status = LM_STATUS_SUCCESS; ^~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_dcbx.c: In function 'lm_dcbx_update_lpme_set_params': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_dcbx.c:5065:17: error: variable 'lm_status' set but not used [-Werror=unused-but-set-variable] lm_status_t lm_status = LM_STATUS_SUCCESS; ^~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_devinfo.c: In function 'lm_get_bars_info': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_devinfo.c:605:19: error: variable 'tr_e' set but not used [-Werror=unused-but-set-variable] u32_t m_e,tr_e,tw_e; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_devinfo.c:605:15: error: variable 'm_e' set but not used [-Werror=unused-but-set-variable] u32_t m_e,tr_e,tw_e; ^~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_init_reset.c: In function 'lm_cleanup_after_flr': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_init_reset.c:532:15: error: variable 'tmp' set but not used [-Werror=unused-but-set-variable] u32_t tmp = 0; ^~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_init_reset.c:531:15: error: variable 'm_en' set but not used [-Werror=unused-but-set-variable] u32_t m_en; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_init_reset.c: In function 'lm_chip_reset': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_init_reset.c:1842:28: error: variable 'val' set but not used [-Werror=unused-but-set-variable] u32_t val = 0; ^~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_init_reset.c: In function 'init_semi_port': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_init_reset.c:3214:15: error: variable 'kuku' set but not used [-Werror=unused-but-set-variable] u32_t kuku = 0; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_init_reset.c: In function 'prs_brb_mem_setup': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_init_reset.c:3791:11: error: variable 'trash' set but not used [-Werror=unused-but-set-variable] u32_t trash = 0; ^~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_init_reset.c: In function 'init_common_part': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_init_reset.c:4192:17: error: variable 'rc' set but not used [-Werror=unused-but-set-variable] u8_t rc = 0; ^~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_init_reset.c:4191:17: error: variable 'trash' set but not used [-Werror=unused-but-set-variable] u32_t trash = 0; ^~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_mcp.c:1041:17: error: variable 'val' set but not used [-Werror=unused-but-set-variable] u32_t val = 0; ^~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c: In function 'lm_latch_attn_everest_processing': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c:579:21: error: variable 'func' set but not used [-Werror=unused-but-set-variable] u32_t func = 0; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c:578:21: error: variable 'addr' set but not used [-Werror=unused-but-set-variable] u32_t addr = 0; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c: In function 'lm_cfc_attn_everest_processing': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c:1010:16: error: variable 'valc' set but not used [-Werror=unused-but-set-variable] u32_t val, valc; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c: In function 'lm_ufp_update_priority': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c:1519:36: error: variable 'lm_status' set but not used [-Werror=unused-but-set-variable] lm_status_t lm_status = LM_STATUS_SUCCESS; ^~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c: In function 'lm_gen_attn_everest_processing': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c:1681:11: error: variable 'val' set but not used [-Werror=unused-but-set-variable] u32_t val = 0; ^~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c: In function 'lm_dq_attn_everest_processing': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c:1791:15: error: variable 'valc' set but not used [-Werror=unused-but-set-variable] u32_t val,valc; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c: In function 'lm_handle_deassertion_processing': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c:1825:24: error: variable 'cfc_int_sts' set but not used [-Werror=unused-but-set-variable] u32_t dq_int_sts, cfc_int_sts; ^~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_hw_attn.c:1825:12: error: variable 'dq_int_sts' set but not used [-Werror=unused-but-set-variable] u32_t dq_int_sts, cfc_int_sts; ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_phy.c:1252:28: error: variable 'elink_status' set but not used [-Werror=unused-but-set-variable] u8_t elink_status = ELINK_STATUS_OK; ^~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_phy.c: In function 'lm_update_external_phy_fw_done': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_phy.c:1946:17: error: variable 'ext_phy_addr' set but not used [-Werror=unused-but-set-variable] u8_t ext_phy_addr = 0; ^~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_resc.c:55:11: error: variable 'port' set but not used [-Werror=unused-but-set-variable] u8_t port = 0; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_resc.c: In function 'lm_setup_rcq': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_resc.c:746:42: error: variable 'rxq_chain' set but not used [-Werror=unused-but-set-variable] lm_rx_chain_t * rxq_chain = NULL; ^~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_resc.c: In function 'lm_alloc_resc': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_resc.c:2196:21: error: variable 'mm_cli_idx' set but not used [-Werror=unused-but-set-variable] u8_t mm_cli_idx = 0; ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_resc.c:2194:21: error: variable 'vars' set but not used [-Werror=unused-but-set-variable] lm_variables_t* vars = NULL ; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_resc.c: In function 'lm_setup_resc': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_resc.c:2336:22: error: variable 'tx_info' set but not used [-Werror=unused-but-set-variable] lm_tx_info_t * tx_info = NULL ; ^~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_resc.c:2333:42: error: variable 'sp_sb' set but not used [-Werror=unused-but-set-variable] volatile struct hc_sp_status_block * sp_sb = NULL; ^~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_resc.c:55:11: error: variable 'port' set but not used [-Werror=unused-but-set-variable] u8_t port = 0; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_sb.c:1710:13: error: variable 'func' set but not used [-Werror=unused-but-set-variable] u8_t func = 0; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_sp.c:1648:41: error: variable 'lm_cli_idx' set but not used [-Werror=unused-but-set-variable] lm_cli_idx_t lm_cli_idx = LM_CLI_IDX_MAX; ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_sp.c: In function 'lm_eth_init_command_comp': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_sp.c:4054:20: error: variable 'empty_data' set but not used [-Werror=unused-but-set-variable] u32_t empty_data = 0; ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_stats.c: In function 'lm_stats_on_timer': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_stats.c:475:41: error: variable 'lm_status' set but not used [-Werror=unused-but-set-variable] lm_status_t lm_status = LM_STATUS_SUCCESS ; ^~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_stats.c: In function 'is_pending_stats_completion': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_stats.c:586:42: error: variable 'sp_sb' set but not used [-Werror=unused-but-set-variable] volatile struct hc_sp_status_block * sp_sb=NULL; ^~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_stats.c: In function 'lm_stats_clear_emac_stats': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_stats.c:695:11: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable] u32_t dummy = 0 ; ^~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4rx.c: In function '_lm_tcp_isle_find': ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4rx.c:85:17: error: variable 'isle_cnt' set but not used [-Werror=unused-but-set-variable] u8_t isle_cnt, isle_idx; ^~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4rx.c: In function '_lm_tcp_isle_remove': ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4rx.c:116:17: error: variable 'isles_cnt' set but not used [-Werror=unused-but-set-variable] u8_t isles_cnt; ^~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4rx.c: In function 'lm_tcp_rx_process_cqes': ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4rx.c:1426:19: error: variable 'grq' set but not used [-Werror=unused-but-set-variable] lm_tcp_grq_t *grq; ^~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4rx.c: In function 'lm_tcp_rx_get_buffered_data': ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4rx.c:2242:32: error: variable 'lm_status' set but not used [-Werror=unused-but-set-variable] lm_status_t lm_status; ^~~~~~~~~ ../../common/io/bnxe/bnxe_fcoe.c:1687:9: error: variable 'nullDev' set but not used [-Werror=unused-but-set-variable] int nullDev = B_FALSE; /* false = wait for bnxef UNBIND */ ^~~~~~~ ../../common/io/bnxe/bnxe_rx.c:296:21: error: variable 'pktsRxed' set but not used [-Werror=unused-but-set-variable] u32_t pktsRxed; ^~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_context.c:349:24: error: variable 'context' set but not used [-Werror=unused-but-set-variable] lm_context_info_t* context = NULL; ^~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l4/lm_l4fp.c:79:23: error: variable 'dbg_no_more_bufs' set but not used [-Werror=unused-but-set-variable] u8_t dbg_no_more_bufs = FALSE; ^~~~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c: In function 'lm_sc_alloc_resc': ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c:484:18: error: variable 'chk_buf' set but not used [-Werror=unused-but-set-variable] u8_t *chk_buf = NULL; ^~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c: In function 'lm_fc_init': ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c:934:37: error: variable 'port' set but not used [-Werror=unused-but-set-variable] u32_t port; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c:933:37: error: variable 'func' set but not used [-Werror=unused-but-set-variable] u32_t func; ^~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c: In function 'lm_fc_recycle_cid_cb': ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c:1048:25: error: variable 'lm_status' set but not used [-Werror=unused-but-set-variable] lm_status_t lm_status; ^~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c: In function 'lm_sc_init_iscsi_context': ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c:2189:11: error: variable 'single_cq_pbl_entries' set but not used [-Werror=unused-but-set-variable] u32_t single_cq_pbl_entries; ^~~~~~~~~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c:2187:11: error: variable 'cid' set but not used [-Werror=unused-but-set-variable] u32_t cid; ^~~ ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c: In function 'lm_fc_init_fcoe_context': ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c:2384:11: error: variable 'conn_id' set but not used [-Werror=unused-but-set-variable] u16_t conn_id; ^~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5.c:2383:11: error: variable 'cid' set but not used [-Werror=unused-but-set-variable] u32_t cid; ^~~ ../../common/io/bnxe/577xx/drivers/common/lm/l5/lm_l5sp.c:228:32: error: variable 'spe' set but not used [-Werror=unused-but-set-variable] struct protocol_common_spe spe = {0}; ^~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_niv.c:46:60: error: variable 'lm_status' set but not used [-Werror=unused-but-set-variable] lm_status_t lm_status = LM_STATUS_SUCCESS; ^~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_niv.c: In function 'lm_niv_vif_list_set': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_niv.c:389:16: error: variable 'lm_status' set but not used [-Werror=unused-but-set-variable] lm_status_t lm_status = LM_STATUS_FAILURE; ^~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_niv.c: In function 'lm_niv_vif_list_get': ../../common/io/bnxe/577xx/drivers/common/lm/device/lm_niv.c:423:16: error: variable 'lm_status' set but not used [-Werror=unused-but-set-variable] lm_status_t lm_status = LM_STATUS_FAILURE; ^~~~~~~~~ cc1: all warnings being treated as errors
Updated by Electric Monk almost 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit fb3b6bbf2c922827ddf076fbf2172d96c58a71de
commit fb3b6bbf2c922827ddf076fbf2172d96c58a71de Author: Toomas Soome <tsoome@me.com> Date: 2017-11-20T15:23:55.000Z 8790 bnxe: variable set but not used Reviewed by: Yuri Pankov <yuripv@gmx.com> Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions