Project

General

Profile

Actions

Bug #13807

closed

diff: variable may be used uninitialized

Added by Toomas Soome 2 months ago. Updated about 1 month 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 gcc compilers:

    diff.c: In function 'dump_context_vec':
    diff.c:1177:3: error: 'b' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     1177 |   fetch(ixold, b+1, upb, 0, uflag ? " " : "  ", 1);
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

    diff.c: In function 'dump_context_vec':
    diff.c:1221:3: error: 'd' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       fetch(ixnew, d + 1, upd, 1, "  ", 0);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    *** Error code 1
    dmake: Fatal error: Command failed for target `diff'
    Current working directory /code/illumos-gate/usr/src/cmd/diff

Testing done: build/install/boot. Using diff command.

Actions #1

Updated by Electric Monk 2 months ago

  • Gerrit CR set to 1492
Actions #2

Updated by Toomas Soome about 1 month ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk about 1 month ago

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

git commit 247ccfcd15f7f6b949ea71990372f0f9a93058d2

commit  247ccfcd15f7f6b949ea71990372f0f9a93058d2
Author: Toomas Soome <tsoome@me.com>
Date:   2021-06-19T08:16:58.000Z

    13807 diff: variable may be used uninitialized
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF