Re: [PATCH 2/3] combine-diff: suppress a clang warning
- From
Miles Bader <miles@gnu.org>
- Date
- Feb 7, 2013, 04:12 UTC
- Message-ID
- <876224sqwk.fsf@catnip.gol.com>
- In-Reply-To
- <20130203231549.GV1342@serenity.lan>
John Keeping <john@keeping.me.uk> writes:
> I generally like to get rid of the pointless warnings so that the useful > ones can't hide in the noise. Perhaps "CFLAGS += -Wno-string-plus-int" > would be better for this particular warning, but when there's only one > bit of code that triggers it, tweaking that seemed simpler.
An even better approach would be to file a bug against clang ... it really is a very ill-considered warning -- PTR + OFFS is not just valid C, it's _idiomatic_ in C for getting interior pointers into arrays -- and such a warning should never be enabled by default, or by any standard warning options.
-miles
-- 永日の 澄んだ紺から 永遠へ