Re: [PATCH] fix some clang warnings
- From
Antoine Pelisse <apelisse@gmail.com>
- Date
- Jan 16, 2013, 17:12 UTC
- Message-ID
- <CALWbr2z4TiynwOR3Lk4005dbZaLtcHK3J01ZF73wp8Q7Rm6YBA@mail.gmail.com>
- 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:
Show 22 quoted lines
> 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