From: Antoine Pelisse <apelisse@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, Max Horn <max@quendi.de>,
git <git@vger.kernel.org>, Johannes Sixt <j6t@kdbg.org>
Subject: Re: [PATCH] fix some clang warnings
Date: Wed, 16 Jan 2013 18:12:57 +0100 [thread overview]
Message-ID: <CALWbr2z4TiynwOR3Lk4005dbZaLtcHK3J01ZF73wp8Q7Rm6YBA@mail.gmail.com> (raw)
In-Reply-To: <7vk3rdxe5y.fsf@alter.siamese.dyndns.org>
FWIW, I also happen to have the warning:
advice.c:69:2: warning: expression result unused [-Wunused-value]
error("'%s' is not possible because you have unmerged files.", me);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./git-compat-util.h:314:55: note: expanded from:
#define error(fmt, ...) (error((fmt), ##__VA_ARGS__), -1)
^~
with clang: Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final)
(based on LLVM 3.0)
I can't say about other versions.
On Wed, Jan 16, 2013 at 5:53 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Jeff King <peff@peff.net> writes:
>
>> On Wed, Jan 16, 2013 at 03:53:23PM +0100, Max Horn wrote:
>>
>>> -#ifdef __GNUC__
>>> +#if defined(__GNUC__) && ! defined(__clang__)
>>> #define config_error_nonbool(s) (config_error_nonbool(s), -1)
>>> #endif
>>
>> You don't say what the warning is, but I'm guessing it's complaining
>> about throwing away the return value from config_error_nonbool?
>
> Yeah, I was wondering about the same thing. The other one looks
> similar, ignoring the return value of error().
>
> Also, is this "some versions of clang do not like this"? Or are all
> versions of clang affected?
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-01-16 17:13 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 14:53 [PATCH] fix some clang warnings Max Horn
2013-01-16 16:04 ` Jeff King
2013-01-16 16:53 ` Junio C Hamano
2013-01-16 17:12 ` Antoine Pelisse [this message]
2013-01-16 17:18 ` John Keeping
2013-01-16 17:26 ` Max Horn
2013-01-16 17:50 ` Jeff King
2013-01-16 18:00 ` Jeff King
2013-01-16 18:09 ` Jeff King
2013-01-16 18:12 ` John Keeping
2013-01-16 18:15 ` Jeff King
2013-01-16 18:21 ` Antoine Pelisse
2013-01-16 18:22 ` John Keeping
2013-01-16 18:24 ` Jeff King
2013-01-16 19:01 ` John Keeping
2013-01-17 10:24 ` John Keeping
2013-01-16 22:47 ` [PATCH 1/2] fix clang -Wconstant-conversion with bit fields Antoine Pelisse
2013-01-16 22:47 ` [PATCH 2/2] fix clang -Wtautological-compare with unsigned enum Antoine Pelisse
2013-01-16 23:10 ` Antoine Pelisse
2013-01-17 10:32 ` Antoine Pelisse
2013-01-17 11:00 ` John Keeping
2013-01-17 11:23 ` [PATCH] combine-diff: suppress a clang warning John Keeping
2013-01-17 16:44 ` [PATCH 2/2] fix clang -Wtautological-compare with unsigned enum Linus Torvalds
2013-01-17 16:56 ` Antoine Pelisse
2013-01-17 17:02 ` John Keeping
2013-01-18 17:15 ` Phil Hord
2013-01-18 18:52 ` Linus Torvalds
2013-01-16 23:08 ` [PATCH 1/2] fix clang -Wconstant-conversion with bit fields John Keeping
2013-01-16 23:09 ` Antoine Pelisse
2013-01-16 23:15 ` Antoine Pelisse
2013-01-16 23:43 ` Junio C Hamano
2013-01-16 23:46 ` Junio C Hamano
2013-01-16 18:03 ` [PATCH] fix some clang warnings Tomas Carnecky
2013-01-16 18:12 ` Matthieu Moy
2013-02-01 5:37 ` Miles Bader
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=CALWbr2z4TiynwOR3Lk4005dbZaLtcHK3J01ZF73wp8Q7Rm6YBA@mail.gmail.com \
--to=apelisse@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=max@quendi.de \
--cc=peff@peff.net \
/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).