Project

General

Profile

Actions

Bug #13376

closed

fm: variable may be used uninitialized

Added by Toomas Soome over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors on SPARC:

    ../../common/nic/topo_nic.c: In function 'nic_create_transceiver':
    ../../common/nic/topo_nic.c:256:13: error: 'port' may be used uninitialized in t
    his function [-Werror=maybe-uninitialized]
      if ((ret = nic_port_datalink_props(mod, port, handle, linkid)) != 0)
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    Current working directory /code/illumos-gate/usr/src/lib/fm/topo/modules/common/nic

    ../platform-mem/mem_mdesc.c: In function 'find_grp':
    ../platform-mem/mem_mdesc.c:225:7: error: 'err' may be used uninitialized in thi
    s function [-Werror=maybe-uninitialized]
        err++;
        ~~~^~
    cc1: all warnings being treated as errors
    Current working directory /code/illumos-gate/usr/src/lib/fm/topo/modules/sun4v/dimm

    pi_subr.c: In function 'pi_get_chassisid':
    pi_subr.c:382:5: error: 'result' may be used uninitialized in this function [-We
    rror=maybe-uninitialized]
      if (result != 0 || id == NULL || strlen(id) == 0) {
         ^
    cc1: all warnings being treated as errors
    Current working directory /code/illumos-gate/usr/src/lib/fm/topo/modules/sun4v/sun4vpi

Testing done: nightly build.

Actions #1

Updated by Electric Monk over 1 year ago

  • Gerrit CR set to 1108
Actions #2

Updated by Toomas Soome over 1 year ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk over 1 year ago

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

git commit a92282e44f968185a6bba094d1e5fece2da819cf

commit  a92282e44f968185a6bba094d1e5fece2da819cf
Author: Toomas Soome <tsoome@me.com>
Date:   2020-12-20T18:28:16.000Z

    13376 fm: variable may be used uninitialized
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF