summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bb34c5a)
raw | patch | inline | side by side (parent: bb34c5a)
author | Sebastian Schuberth <sschuberth@gmail.com> | |
Tue, 18 Oct 2011 16:25:50 +0000 (18:25 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 18 Oct 2011 17:34:07 +0000 (10:34 -0700) |
GCC 4.6 claims that
error: 'best.len' may be used uninitialized in this function
so silence that warning which is treated as an error by also initializing
the "len" members of the struct.
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
error: 'best.len' may be used uninitialized in this function
so silence that warning which is treated as an error by also initializing
the "len" members of the struct.
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/inet_ntop.c | patch | blob | history |
diff --git a/compat/inet_ntop.c b/compat/inet_ntop.c
index ea249c6ac6423fd4ef865c1a9d0149ac0ba0cc46..60b5a1d0f8262baca70247923a399fdb4ee3cac1 100644 (file)
--- a/compat/inet_ntop.c
+++ b/compat/inet_ntop.c
for (i = 0; i < NS_IN6ADDRSZ; i++)
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
+ best.len = 0;
cur.base = -1;
+ cur.len = 0;
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
if (words[i] == 0) {
if (cur.base == -1)