Re: [PATCH] parse-options: fix clang opterror() -Wunused-value warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 09, 2013 at 05:06:17AM -0400, Eric Sunshine wrote:

> a469a1019352b8ef (silence some -Wuninitialized false positives;
> 2012-12-15) triggered "unused value" warnings when the return value of
> opterror() and several other error-related functions was not used.
> 5ded807f7c0be10e (fix clang -Wunused-value warnings for error functions;
> 2013-01-16) applied a fix by adding #if !defined(__clang__) in cache.h
> and git-compat-util.h, but misspelled it as #if !defined(clang) in
> parse-options.h. Fix this.
> 
> This mistake went unnoticed because existing callers of opterror()
> utilize its return value.  1158826394e162c5 (parse-options: add
> OPT_CMDMODE(); 2013-07-30), however, adds a new invocation of opterror()
> which ignores the return value, thus triggering the "unused value"
> warning.

Oops.

Patch looks obviously correct. Thanks for a nice explanation of what
happened.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]