@matheusbsbs / matheus-bagliano / commits / ef7a8e3b95
Fork 0

notes: Initialize variable to appease Sun Studio

Sun Studio 12 Update 1 thinks that *t could be uninitialized, ostensibly because it doesn't take rewrite_cmd into account in its static analysis. builtin/notes.c: In function `notes_copy_from_stdin': builtin/notes.c:419: warning: 't' might be used uninitialized in this function Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Jun 14, 2010 at 23:40 UTC ef7a8e3b9575a6dc60e2d9e35008914a9eaabfff
1 file changed +1 -1
builtin/notes.c
+1 -1
@@ -416,7 +416,7 @@ int notes_copy_from_stdin(int force, const char *rewrite_cmd)
416 {
417 struct strbuf buf = STRBUF_INIT;
418 struct notes_rewrite_cfg *c = NULL;
419 - struct notes_tree *t;
419 + struct notes_tree *t = NULL;
420 int ret = 0;
421
422 if (rewrite_cmd) {