Project

General

Profile

Actions

Bug #13755

open

mdb: variable may be used uninitialized

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

Status:
In Progress
Priority:
Normal
Assignee:
Category:
mdb - modular debugger
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build error:

    ../../../common/mdb/mdb_fmt.c: In function 'mdb_fmt_print':
    ../../../common/mdb/mdb_fmt.c:779:8: error: 'buf' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        if (mdb_tgt_aread(t, as, buf, fp->f_size, addr) !=
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    *** Error code 1
    dmake: Fatal error: Command failed for target `mdb_fmt.o'
    Current working directory /code/illumos-gate/usr/src/cmd/mdb/intel/ia32/mdb

However, this error is there because our die() and fail() functions do not return, but gcc does not know about it.

While there, nuke CNOWARN_UNINIT.

Actions #1

Updated by Electric Monk 11 days ago

  • Gerrit CR set to 1446
Actions #2

Updated by Toomas Soome 11 days ago

  • Subject changed from mdb: 'buf' may be used uninitialized to mdb: variable may be used uninitialized
Actions

Also available in: Atom PDF