Project

General

Profile

Actions

Bug #13746

closed

statd: variable may be used uninitialized

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
nfs - NFS server and client
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with gcc 10/shadow gcc 7:

    sm_statd.c: In function 'create_symlink':
    sm_statd.c:972:6: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    972 |   if (error == EEXIST) {
        |      ^
    cc1: all warnings being treated as errors

    sm_statd.c: In function 'record_addr':
    sm_statd.c:1345:10: error: 'addr.S_un.S_addr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       (void) sprintf(ascii_addr, "%s.%s", famstr, inet_ntoa(addr));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sm_statd.c:1349:10: error: 'addr6' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       (void) sprintf(ascii_addr, "%s.%s", famstr,
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           inet_ntop(family, addr6, abuf, sizeof (abuf)));
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    *** Error code 1
    dmake: Fatal error: Command failed for target `sm_statd.o'
    Current working directory /code/illumos-gate/usr/src/cmd/fs.d/nfs/statd

Testing done: build/install/boot

Actions #1

Updated by Electric Monk about 1 year ago

  • Gerrit CR set to 1438
Actions #2

Updated by Electric Monk about 1 year ago

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

git commit c6c850bf6e55f15fd8f56fb2e2c696a02b87948d

commit  c6c850bf6e55f15fd8f56fb2e2c696a02b87948d
Author: Toomas Soome <tsoome@me.com>
Date:   2021-05-10T17:06:56.000Z

    13746 statd: 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