From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] Detailed diagnosis when parsing an object name fails.
Date: Mon, 07 Dec 2009 11:07:59 +0100 [thread overview]
Message-ID: <vpqws0zcd1c.fsf@bauges.imag.fr> (raw)
In-Reply-To: <7vk4wz9rbt.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Sun\, 06 Dec 2009 23\:27\:34 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
> The second round still had a few compilation warnings (turned to errors in
> my environment) so I fixed them up somewhat.
Thanks. For some reasons, I had CFLAGS=-g and I didn't see the
warnings :-(
> I stopped before getting a
> clean compile, though---you will still get:
>
> sha1_name.c: In function 'get_sha1_with_mode_1':
> sha1_name.c:956: error: 'object_name' may be used uninitialized in this function
This one is strange. I don't git it with gcc 4.4, even with -Wall
-Werror. And indeed, object_name is initialized when !gently, which is
precisely when we use it.
I did
- char *object_name;
+ char *object_name = NULL;
to make sure the warning goes away on your machine, but I don't
understand what's going on.
> cache.h | 4 ++--
> sha1_name.c | 2 +-
Squashed into v3, together with initialisation of object_name, and two
s/int/unsigned/ to please gcc -Wextra.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2009-12-07 10:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-02 20:01 [PATCH v2] Detailed diagnosis when parsing an object name fails y
2009-12-03 20:37 ` Junio C Hamano
2009-12-06 18:28 ` Matthieu Moy
2009-12-06 18:45 ` Matthieu Moy
2009-12-07 0:30 ` Junio C Hamano
2009-12-07 7:27 ` Junio C Hamano
2009-12-07 10:07 ` Matthieu Moy [this message]
2009-12-07 10:10 ` [PATCH v3] " Matthieu Moy
2010-02-15 14:16 ` Sverre Rabbelier
-- strict thread matches above, loose matches on Subject: below --
2009-12-02 20:01 [PATCH v2] " y
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=vpqws0zcd1c.fsf@bauges.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.