From ef7a8e3b9575a6dc60e2d9e35008914a9eaabfff Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 14 Jun 2010 23:40:05 +0000 Subject: [PATCH] notes: Initialize variable to appease Sun Studio MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- builtin/notes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/notes.c b/builtin/notes.c index 52b72fca6..26617546c 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -416,7 +416,7 @@ int notes_copy_from_stdin(int force, const char *rewrite_cmd) { struct strbuf buf = STRBUF_INIT; struct notes_rewrite_cfg *c = NULL; - struct notes_tree *t; + struct notes_tree *t = NULL; int ret = 0; if (rewrite_cmd) { -- 2.26.2