Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage-utils:master commit in: /
Date: Mon, 27 Nov 2017 07:56:04
Message-Id: 1511769237.89524269b57888bb86a34c6fd7ef0422699fd30b.robbat2@gentoo
1 commit: 89524269b57888bb86a34c6fd7ef0422699fd30b
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 27 07:53:57 2017 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 27 07:53:57 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=89524269
7
8 Fix -Wmaybe-uninitialized.
9
10 In file included from include_applets.h:13:0,
11 from main.c:1485:
12 qgrep.c: In function ‘qgrep_main’:
13 qgrep.c:212:5: warning: ‘dentry’ may be used uninitialized in this function [-Wmaybe-uninitialized]
14 if (*cat_dirent_pt == NULL || *cat_dir_pt == NULL)
15 ^
16 qgrep.c:245:17: note: ‘dentry’ was declared here
17 struct dirent *dentry;
18
19 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
20
21 qgrep.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24 diff --git a/qgrep.c b/qgrep.c
25 index 9d2752e..0680035 100644
26 --- a/qgrep.c
27 +++ b/qgrep.c
28 @@ -242,7 +242,7 @@ int qgrep_main(int argc, char **argv)
29 DIR *eclass_dir = NULL;
30 DIR *vdb_dir = NULL;
31 DIR *cat_dir = NULL;
32 - struct dirent *dentry;
33 + struct dirent *dentry = NULL;
34 char ebuild[_Q_PATH_MAX];
35 char name[_Q_PATH_MAX];
36 char *label;