Project

General

Profile

Actions

Bug #13748

open

ypcmd: variable may be used uninitialized

Added by Toomas Soome 12 days ago. Updated 12 days 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 7 as shadow:

    revnetgroup.c: In function 'appendgroup':
    revnetgroup.c:235:13: error: 'prev' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      235 |  prev->next = MALLOC(stringnode);
    cc1: all warnings being treated as errors

    changepasswd.c: In function 'changepasswd':
    changepasswd.c:598:4: error: 'adj_crypt_end' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      598 |    sprintf(adjbuf_new,
          |    ^~~~~~~~~~~~~~~~~~~
      599 |        "%s%s%s", name, newpw.pw_passwd, adj_crypt_end);
          |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

    revnetgroup.c: In function 'enter':
    revnetgroup.c:260:21: error: 'gelprev' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           gelprev->next = newentry(name, group);
           ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    *** Error code 1
    dmake: Fatal error: Command failed for target `revnetgroup.o'
    Current working directory /code/illumos-gate/usr/src/cmd/ypcmd/revnetgroup

Actions #1

Updated by Electric Monk 12 days ago

  • Gerrit CR set to 1441
Actions

Also available in: Atom PDF