Project

General

Profile

Actions

Bug #13749

closed

users: variable may be used uninitialized

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with shadow gcc 7:

    users.c: In function 'main':
    users.c:654: error: 'g_arg' may be used uninitialized in this function [-Wuninitialized]
    users.c:660: error: 'groupcount' may be used uninitialized in this function [-Wuninitialized]
    users.c:646: error: 'reqloginhead' may be used uninitialized in this function [-Wuninitialized]
    *** Error code 1
    dmake: Fatal error: Command failed for target `users.o'

    users.c: In function 'main':
    users.c:740:8: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         if (rc != 0) {
            ^
    cc1: all warnings being treated as errors
    *** Error code 1
    dmake: Fatal error: Command failed for target `users.o'
    Current working directory /code/illumos-gate/usr/src/cmd/users

    users.c: In function 'main':
    users.c:794:8: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         if (rc != 0) {
            ^
    cc1: all warnings being treated as errors
    *** Error code 1
    dmake: Fatal error: Command failed for target `users.o'
    Current working directory /code/illumos-gate/usr/src/cmd/users

Testing done: build/install/boot/run

Actions #1

Updated by Electric Monk about 1 year ago

  • Gerrit CR set to 1442
Actions #2

Updated by Toomas Soome about 1 year ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk about 1 year ago

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

git commit dfae6925aa6a17baa5c4ac06bcda3654657432d1

commit  dfae6925aa6a17baa5c4ac06bcda3654657432d1
Author: Toomas Soome <tsoome@me.com>
Date:   2021-05-03T18:39:49.000Z

    13749 users: variable may be used uninitialized
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF