From: "Marco Costalba" <mcostalba@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: [PATCH] Fix an unitialized pointer in merge-recursive.c
Date: Thu, 16 Aug 2007 10:00:26 +0200 [thread overview]
Message-ID: <e5bfff550708160100t5aa93430x6cbe83e6e7a61d73@mail.gmail.com> (raw)
Indeed &mrtree is passed to merge_trees() that not always
seems to set the value, so on some paths mrtree could
return uninitialized.
Spotted by a gcc 4.2.1 warning
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
---
merge-recursive.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index 16f6a0f..934b0d6 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1610,7 +1610,7 @@ static int merge(struct commit
{
struct commit_list *iter;
struct commit *merged_common_ancestors;
- struct tree *mrtree;
+ struct tree *mrtree = NULL;
int clean;
if (show(4)) {
--
1.5.3.rc4.67.gf9286
next reply other threads:[~2007-08-16 8:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-16 8:00 Marco Costalba [this message]
2007-08-16 8:08 ` [PATCH] Fix an unitialized pointer in merge-recursive.c Junio C Hamano
2007-08-16 8:11 ` Marco Costalba
2007-08-16 8:23 ` Junio C Hamano
2007-08-16 8:30 ` Junio C Hamano
2007-08-16 9:07 ` David Kastrup
2007-08-16 13:16 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5bfff550708160100t5aa93430x6cbe83e6e7a61d73@mail.gmail.com \
--to=mcostalba@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).