summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 16f5bfc)
raw | patch | inline | side by side (parent: 16f5bfc)
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | |
Sun, 11 Sep 2011 19:39:32 +0000 (20:39 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 9 Oct 2011 20:28:04 +0000 (13:28 -0700) |
In particular, gcc complains as follows:
CC tree-walk.o
tree-walk.c: In function `traverse_trees':
tree-walk.c:347: warning: 'e' might be used uninitialized in this \
function
CC builtin/revert.o
builtin/revert.c: In function `verify_opt_mutually_compatible':
builtin/revert.c:113: warning: 'opt2' might be used uninitialized in \
this function
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
CC tree-walk.o
tree-walk.c: In function `traverse_trees':
tree-walk.c:347: warning: 'e' might be used uninitialized in this \
function
CC builtin/revert.o
builtin/revert.c: In function `verify_opt_mutually_compatible':
builtin/revert.c:113: warning: 'opt2' might be used uninitialized in \
this function
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/revert.c | patch | blob | history | |
tree-walk.c | patch | blob | history |
diff --git a/builtin/revert.c b/builtin/revert.c
index ba27cf15ee5478981a0a9a53493f41b67fcf9440..200149e2e78525d34f04eb29752453561faf5d88 100644 (file)
--- a/builtin/revert.c
+++ b/builtin/revert.c
static void verify_opt_mutually_compatible(const char *me, ...)
{
- const char *opt1, *opt2;
+ const char *opt1, *opt2 = NULL;
va_list ap;
va_start(ap, me);
diff --git a/tree-walk.c b/tree-walk.c
index 808bb55ba3f21d113e6358f6874e2e20cb33bbea..a8d8a66d597f54e3a99a4c3e9615330eb7a7fe1a 100644 (file)
--- a/tree-walk.c
+++ b/tree-walk.c
unsigned long mask, dirmask;
const char *first = NULL;
int first_len = 0;
- struct name_entry *e;
+ struct name_entry *e = NULL;
int len;
for (i = 0; i < n; i++) {