]> granicus.if.org Git - procps-ng/commitdiff
pmap: silence a clang -Wuninitialized variable warning
authorJim Warner <james.warner@comcast.net>
Sat, 29 Aug 2015 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Mon, 31 Aug 2015 07:47:53 +0000 (17:47 +1000)
Reference(s):
pmap.c:618:20: warning: variable 'start' is uninitialized when used here [-Wuninitialized]
                                               maxw1, start,
                                                      ^~~~~
Signed-off-by: Jim Warner <james.warner@comcast.net>
pmap.c

diff --git a/pmap.c b/pmap.c
index 1d2f2e43a7e8b25a2dedbebcfc625ebf5e506361..713dd7f61aa8e28b06a7455d2d2a85b5aa70517a 100644 (file)
--- a/pmap.c
+++ b/pmap.c
@@ -588,7 +588,7 @@ static int one_proc(proc_t * p)
                char perms[32];
                /* to clean up unprintables */
                char *tmp;
-               unsigned KLONG start, end;
+               unsigned KLONG end, start = 0;;
                unsigned long long file_offset, inode;
                unsigned dev_major, dev_minor;
                unsigned long long smap_value;