Project

General

Profile

Bug #12367

aac: variable may be used uninitialized

Added by Toomas Soome 9 months ago. Updated 9 months ago.

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

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Build error with gcc 9:

    ../../common/io/aac/aac.c: In function 'aac_check_firmware':
    ../../common/io/aac/aac.c:2297:11: error: 'max_sectors' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     2297 |  uint32_t max_sectors;
          |           ^~~~~~~~~~~
    ../../common/io/aac/aac.c:2296:11: error: 'sg_tablesize' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     2296 |  uint32_t sg_tablesize;
          |           ^~~~~~~~~~~~
    ../../common/io/aac/aac.c:2407:23: error: 'max_fibs' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     2407 |   softs->aac_max_fibs = max_fibs;
          |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
    ../../common/io/aac/aac.c: In function 'aac_cmd_dma_alloc':
    ../../common/io/aac/aac.c:5356:2: error: 'bioerr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     5356 |  bioerror(bp, bioerr);
          |  ^~~~~~~~~~~~~~~~~~~~
    ../../common/io/aac/aac.c: In function 'aac_tran_bus_config':
    ../../common/io/aac/aac.c:7487:5: error: 'rval' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     7487 |  if (rval == NDI_SUCCESS)
          |     ^
    cc1: all warnings being treated as errors

Testing done: build/install/boot

#1

Updated by Toomas Soome 9 months ago

  • Description updated (diff)
#2

Updated by Electric Monk 9 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit c9ffe217655ce62448bdb45d6f113f43b4dfcc54

commit  c9ffe217655ce62448bdb45d6f113f43b4dfcc54
Author: Toomas Soome <tsoome@me.com>
Date:   2020-03-15T20:28:30.000Z

    12367 aac: variable may be used uninitialized
    Reviewed by: C Fraire <cfraire@me.com>
    Reviewed by: Gary Mills <gary_mills@fastmail.fm>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF