[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #49935] num_mkfiles uninitialized
From: |
Martin Dorey |
Subject: |
[bug #49935] num_mkfiles uninitialized |
Date: |
Mon, 26 Dec 2016 18:16:56 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?49935>
Summary: num_mkfiles uninitialized
Project: make
Submitted by: mdorey
Submitted on: Mon 26 Dec 2016 10:16:55 AM PST
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: SCM
Operating System: POSIX-Based
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
main.c:2169:11: error: ‘num_mkfiles’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
I've been bitten by false-positives from that warning in the past, which is
probably not unrelated to why it's not happening on Paul's doubtless-later
compiler, but I think it has a point here:
address@hidden:~/download/make-git$ git diff
diff --git a/main.c b/main.c
index df7bb3a..fa65446 100644
--- a/main.c
+++ b/main.c
@@ -2164,7 +2164,7 @@ main (int argc, char **argv, char **envp)
{
struct goaldep *d;
- unsigned int num_mkfiles;
+ unsigned int num_mkfiles = 0;
for (d = read_files; d != NULL; d = d->next)
++num_mkfiles;
address@hidden:~/download/make-git$
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49935>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #49935] num_mkfiles uninitialized,
Martin Dorey <=