Project

General

Profile

Actions

Bug #12401

open

arn: variable may be used uninitialized

Added by Toomas Soome about 1 year ago. Updated 12 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with gcc 9:

    ../../common/io/arn/arn_main.c: In function 'arn_chan2flags':
    ../../common/io/arn/arn_main.c:794:9: error: 'channel_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      794 |  return (channel_mode);
          |         ^
    ../../common/io/arn/arn_main.c: In function 'arn_chan_change':
    ../../common/io/arn/arn_main.c:826:3: error: 'wlmode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      826 |   arn_setcurmode(sc, wlmode);
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~

    ../../common/io/arn/arn_main.c: In function 'arn_chan2flags':
    ../../common/io/arn/arn_main.c:794:9: error: 'channel_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      794 |  return (channel_mode);
          |         ^
    ../../common/io/arn/arn_main.c: In function 'arn_chan_change':
    ../../common/io/arn/arn_main.c:826:3: error: 'wlmode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      826 |   arn_setcurmode(sc, wlmode);
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../common/io/arn/arn_main.c: In function 'arn_newstate':
    ../../common/io/arn/arn_main.c:1394:13: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     1394 |  int32_t i, error;
          |             ^~~~~

    ../../common/io/arn/arn_eeprom.c:630:36: error: 'minPwrT4[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      630 |  *pMinCalPower = (int16_t)(minPwrT4[0] / 2);
          |                            ~~~~~~~~^~~
    ../../common/io/arn/arn_eeprom.c: In function 'ath9k_hw_get_def_gain_boundaries_pdadcs':
    ../../common/io/arn/arn_eeprom.c:798:36: error: 'minPwrT4[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      798 |  *pMinCalPower = (int16_t)(minPwrT4[0] / 2);
          |                            ~~~~~~~~^~~
    ../../common/io/arn/arn_eeprom.c: In function 'ath9k_hw_set_txpower':
    ../../common/io/arn/arn_eeprom.c:2096:9: error: 'val' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     2096 |  return (val);
          |         ^
    ../../common/io/arn/arn_eeprom.c: In function 'ath9k_hw_eeprom_set_board_values':
    ../../common/io/arn/arn_eeprom.c:2627:9: error: 'val' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     2627 |  return (val);
          |         ^
    ../../common/io/arn/arn_eeprom.c: In function 'ath9k_hw_get_eeprom_antenna_cfg':
    ../../common/io/arn/arn_eeprom.c:2698:9: error: 'val' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     2698 |  return (val);
          |         ^
    ../../common/io/arn/arn_eeprom.c: In function 'ath9k_hw_get_num_ant_config':
    ../../common/io/arn/arn_eeprom.c:2742:9: error: 'val' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     2742 |  return (val);
          |         ^
    ../../common/io/arn/arn_eeprom.c: In function 'ath9k_hw_get_eeprom':
    ../../common/io/arn/arn_eeprom.c:2913:9: error: 'val' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     2913 |  return (val);
          |         ^
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk 12 months ago

  • Gerrit CR set to 420
Actions

Also available in: Atom PDF