git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Pat Notz <patnotz@gmail.com>
Cc: git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: [PATCH 1/2] dir.c: fix uninitialized memory warning
Date: Thu, 16 Sep 2010 23:13:11 +0000	[thread overview]
Message-ID: <AANLkTim4SiuX=aWLeYXKpgvD+Nh1trH8qgf3V36iVa9w@mail.gmail.com> (raw)
In-Reply-To: <1284670403-90716-2-git-send-email-patnotz@gmail.com>

On Thu, Sep 16, 2010 at 20:53, Pat Notz <patnotz@gmail.com> wrote:
> GCC 4.4.4 on MacOS warns about potential use of uninitialized memory.
>
> Signed-off-by: Pat Notz <patnotz@gmail.com>
> ---
>  dir.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/dir.c b/dir.c
> index 133f472..d1e5e5e 100644
> --- a/dir.c
> +++ b/dir.c
> @@ -232,7 +232,7 @@ int add_excludes_from_file_to_list(const char *fname,
>  {
>        struct stat st;
>        int fd, i;
> -       size_t size;
> +       size_t size = 0;
>        char *buf, *entry;

What does the GCC warning say exactl? I.e. what line does it complain
about?

Maybe this is a logic error introduced in v1.7.0-rc0~25^2? I haven't
checked.

  reply	other threads:[~2010-09-16 23:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16 20:53 [PATCH 0/2] Fix uninitialized memory read and comment typo Pat Notz
2010-09-16 20:53 ` [PATCH 1/2] dir.c: fix uninitialized memory warning Pat Notz
2010-09-16 23:13   ` Ævar Arnfjörð Bjarmason [this message]
2010-09-16 23:26     ` Nguyen Thai Ngoc Duy
2010-09-17  0:32       ` Pat Notz
2010-09-17  1:04         ` Nguyen Thai Ngoc Duy
2010-09-17  1:13           ` Pat Notz
2010-09-17 17:23             ` Pat Notz
2010-09-16 20:53 ` [PATCH 2/2] strbuf.h: fix comment typo Pat Notz

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='AANLkTim4SiuX=aWLeYXKpgvD+Nh1trH8qgf3V36iVa9w@mail.gmail.com' \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=patnotz@gmail.com \
    --cc=pclouds@gmail.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).