Project

General

Profile

Actions

Bug #13801

open

ilbadm: variable may be used uninitialized

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

Status:
In Progress
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with gcc compilers:

    ilbadm_subr.c: In function 'ilbadm_set_netmask':
    ilbadm_subr.c:823:5: error: 'r' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      if (r != B_TRUE) {
         ^
    ilbadm_subr.c: In function 'i_parse_optstring':
    ilbadm_subr.c:1139:6: error: 'keyword' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       rc = i_store_val(val, store, keyword);
       ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

    ilbadm_subr.c: In function 'ilbadm_set_netmask':
    ilbadm_subr.c:793: error: 'r' may be used uninitialized in this function [-Wuninitialized]
    ilbadm_subr.c: In function 'i_parse_optstring':
    ilbadm_subr.c:1083: error: 'keyword' may be used uninitialized in this function [-Wuninitialized]
    *** Error code 1
    dmake: Fatal error: Command failed for target `ilbadm_subr.o'

    ilbadm_rules.c: In function 'ilbadm_create_rule':
    ilbadm_rules.c:1147:7: error: 'maskstr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        rc = ilbadm_set_netmask(maskstr, &rd->r_stickymask,
        ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            rd->r_vip.ia_af);
            ~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

    ilbadm_stats.c: In function 'of_itemize_stats':
    ilbadm_stats.c:347: error: 'stat_ind' may be used uninitialized in this function [-Wuninitialized]
    ilbadm_stats.c: In function 'of_rule_stats':
    ilbadm_stats.c:398: error: 'ind' may be used uninitialized in this function [-Wuninitialized]
    ilbadm_stats.c: In function 'of_server_stats':
    ilbadm_stats.c:300: error: 'sumfunc' may be used uninitialized in this function [-Wuninitialized]
    *** Error code 1
    dmake: Warning: Command failed for target `ilbadm_stats.o'

    ilbadm_subr.c: In function 'i_match_hostorip':
    ilbadm_subr.c:541:23: error: 'p1' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        if (p2 == -1 || p2 <= p1 || p2 > ILB_MAX_PORT ||
                        ~~~^~~~~
    cc1: all warnings being treated as errors
    *** Error code 1
    dmake: Fatal error: Command failed for target `ilbadm_subr.o'
    Current working directory /code/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ilbadm

Actions #1

Updated by Electric Monk 7 months ago

  • Gerrit CR set to 1485
Actions

Also available in: Atom PDF