Project

General

Profile

Actions

Bug #13761

closed

logadm: variable may be used uninitialized

Added by Toomas Soome over 2 years ago. Updated over 2 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Build errors:

    cc1: warnings being treated as errors
    main.c: In function 'main':
    main.c:165: error: 'clopts' may be used uninitialized in this function [-Wuninitialized]

    cc1: warnings being treated as errors
    conf.c: In function 'conf_scan':
    conf.c:198: error: 'cp' may be used uninitialized in this function [-Wuninitialized]

    main.c: In function 'docopytruncate':
    main.c:1241:2: error: 'len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      } while (len >= 0);
      ^
    cc1: all warnings being treated as errors
    *** Error code 1
    dmake: Fatal error: Command failed for target `main.o'
    Current working directory /code/illumos-gate/usr/src/cmd/logadm

Clean them all up.

Testing done. build/install/boot.


Related issues

Related to illumos gate - Bug #13789: logadm: conf_scan() depens on non-zero value from stackClosedToomas Soome

Actions
Actions #1

Updated by Electric Monk over 2 years ago

  • Gerrit CR set to 1450
Actions #2

Updated by Toomas Soome over 2 years ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk over 2 years ago

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

git commit 2ed5ea5a06df7f669d20d88729c625981a0de7bc

commit  2ed5ea5a06df7f669d20d88729c625981a0de7bc
Author: Toomas Soome <tsoome@me.com>
Date:   2021-04-30T07:14:42.000Z

    13761 logadm: variable may be used uninitialized
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions #4

Updated by Toomas Soome over 2 years ago

  • Related to Bug #13789: logadm: conf_scan() depens on non-zero value from stack added
Actions

Also available in: Atom PDF