Project

General

Profile

Bug #12377

aggr: 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 errors with gcc 9:

    ../../common/io/aggr/aggr_ctl.c: In function 'aggr_ioc_modify':
    ../../common/io/aggr/aggr_ctl.c:72:10: error: 'lacp_timer' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       72 |  return (aggr_grp_modify(modify_arg->lu_linkid, modify_mask, policy,
          |         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       73 |      mac_fixed, mac_addr, lacp_mode, lacp_timer));
          |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../common/io/aggr/aggr_ctl.c:72:10: error: 'lacp_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    ../../common/io/aggr/aggr_ctl.c:72:10: error: 'mac_fixed' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    ../../common/io/aggr/aggr_ctl.c:72:10: error: 'policy' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    ../../common/io/aggr/aggr_ctl.c: In function 'aggr_ioc_add_remove':
    ../../common/io/aggr/aggr_ctl.c:242:9: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      242 |  return (rc);
          |         ^

    ../../common/io/aggr/aggr_grp.c: In function 'aggr_add_pseudo_rx_group':
    ../../common/io/aggr/aggr_grp.c:743:22: error: 'i' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      743 |  uint_t   hw_rh_cnt, i;
          |                      ^
    ../../common/io/aggr/aggr_grp.c:792:2: error: 'addr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      792 |  for (a = rx_grp->arg_macaddr; a != addr; a = a->aua_next)
          |  ^~~
    cc1: all warnings being treated as errors

Testing done: build/install/boot

#1

Updated by Toomas Soome 9 months ago

  • Subject changed from aggr: may be used uninitialized in aggr_add_pseudo_rx_group() to aggr: may be used uninitialized
  • Description updated (diff)
#2

Updated by Toomas Soome 9 months ago

  • Description updated (diff)
#3

Updated by Electric Monk 9 months ago

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

git commit 34a4e6b53d2e6f2605fd77cda5b161201d7d0f20

commit  34a4e6b53d2e6f2605fd77cda5b161201d7d0f20
Author: Toomas Soome <tsoome@me.com>
Date:   2020-03-15T20:32:42.000Z

    12377 aggr: may be used uninitialized
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Reviewed by: Gary Mills <gary_mills@fastmail.fm>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF