Project

General

Profile

Actions

Bug #13755

open

mdb: variable may be used uninitialized

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

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

90%

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

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 about 2 years ago

  • Gerrit CR set to 1446
Actions #2

Updated by Toomas Soome about 2 years ago

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

Also available in: Atom PDF