aboutsummaryrefslogtreecommitdiff
path: root/builtin/revert.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2011-09-11 20:39:32 +0100
committerJunio C Hamano <gitster@pobox.com>2011-10-09 13:28:04 -0700
commit27c0f768843b6d844674f1fb8dc2676d830b56e3 (patch)
tree8f5e9fba34ffd5c042aee1b30118869feff13650 /builtin/revert.c
parent16f5bfcf65b46260f3a4fc66769e8b5cfd18a11a (diff)
downloadgit-27c0f768843b6d844674f1fb8dc2676d830b56e3.tar.gz
git-27c0f768843b6d844674f1fb8dc2676d830b56e3.tar.xz
Fix some "variable might be used uninitialized" warnings
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>
Diffstat (limited to 'builtin/revert.c')
-rw-r--r--builtin/revert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/revert.c b/builtin/revert.c
index ba27cf15e..200149e2e 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -110,7 +110,7 @@ static void verify_opt_compatible(const char *me, const char *base_opt, ...)
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);