[Bug middle-end/88251] -Wformat-truncation=2 false alarms when compiling gzip, Emacs

eggert at cs dot ucla.edu gcc-bugzilla@gcc.gnu.org
Thu Nov 29 20:17:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88251

--- Comment #5 from eggert at cs dot ucla.edu ---
(In reply to Martin Sebor from comment #4)
> I forgot that level 2 doesn't consider whether the return value is used.  It
> might perhaps be worth reconsidering whether the warning should trigger when
> the return value is used at level 2.

Thanks, that suggestion sounds like a good idea. It should address the issue in
the strerror_r.i and emacsclient2.i examples, which is a good sign. Although it
wouldn't handle the strerror_r4.i example, that is a special case and arguably
it's worth the hassle of suppressing the diagnostic individually for that case.


More information about the Gcc-bugs mailing list