This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/66526] New: Use of uninitialized variable


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66526

            Bug ID: 66526
           Summary: Use of uninitialized variable
           Product: gcc
           Version: 4.7.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pini_os at yahoo dot fr
  Target Milestone: ---

Compiling Ada frontend with -Wuninitialized reports the following warning:

gcc/ada/g-expect.adb:1338:7: warning: âINPUTâ is used uninitialized in this
function
gcc/ada/g-expect.adb:1339:7: warning: âOUTPUTâ is used uninitialized in this
function
gcc/ada/g-expect.adb:1340:7: warning: âERRORâ is used uninitialized in this
function

In function âSet_Up_Child_Communicationsâ, these local variables are only
initialized within the âif No_Fork_On_Targetâ but each is used twice outside of
it.

The uses are following an execvp call, so no harm on *nix systems, but the
source is still oddly shaped. The uses of these variables should be controlled
by the same condition as their initialization.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]