Project

General

Profile

Actions

Bug #13746

open

statd: variable may be used uninitialized

Added by Toomas Soome 13 days ago. Updated 13 days ago.

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

90%

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 13 days ago

  • Gerrit CR set to 1438
Actions

Also available in: Atom PDF