https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448
Martin Sebor changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448
--- Comment #6 from Martin Sebor ---
Author: msebor
Date: Tue Feb 14 16:51:24 2017
New Revision: 245437
URL: https://gcc.gnu.org/viewcvs?rev=245437&root=gcc&view=rev
Log:
PR middle-end/79448 - unhelpful -Wformat-truncation=2 warning
gcc/testsui
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448
--- Comment #5 from Mark Wielaard ---
(In reply to Martin Sebor from comment #4)
> Ouch. When its size argument is zero, a snprintf call is a request to
> compute the size of output without actually writing any into the destination
> (which may
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448
--- Comment #4 from Martin Sebor ---
Ouch. When its size argument is zero, a snprintf call is a request to compute
the size of output without actually writing any into the destination (which may
be a null pointer). At level 2 the checker uses t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448
--- Comment #3 from Mark Wielaard ---
A "workaround" for the example given in the description is to just pick some
arbitrary number you know wouldn't get exceeded. e.g:
/* To help -Wformat-truncation=2 pretend the "count"
translation will
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448
Martin Sebor changed:
What|Removed |Added
Keywords||patch
Status|NEW