https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354
--- Comment #11 from Martin Sebor ---
(In reply to Alejandro Colomar from comment #10)
> Many other warnings are supressed with (void), why is this one so special?
Not too many warnings can be suppressed by casts. Those that can must be at
leas
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354
Alejandro Colomar changed:
What|Removed |Added
CC||colomar.6.4.3 at gmail dot com
--- C
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354
--- Comment #9 from Mike Sharov ---
(In reply to Martin Sebor from comment #8)
> A simple way to avoid the warning while also avoiding bugs resulting from
> unhandled truncation is to detect it and abort if it happens, e.g.
First of all, you mig
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354
--- Comment #8 from Martin Sebor ---
The problem in the pathname example is one of the bugs the warning is meant to
prevent. Allowing a pathname to be silently truncated can lead to bugs -- see
CWE 22 for some background and CVE-2002-0499 for an
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354
Mike Sharov changed:
What|Removed |Added
CC||msharov at users dot
sourceforge.n
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354
John Steele Scott changed:
What|Removed |Added
CC||toojays at toojays dot net
--- Comme
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354
--- Comment #5 from Stephan Bergmann ---
(In reply to Martin Sebor from comment #3)
> The warning does just what it's designed to do: point out the potential
> unhandled truncation.
But it is unusable in practice if there is no reliable way to s
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354
Eric Gallager changed:
What|Removed |Added
CC||egall at gwmail dot gwu.edu
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354
--- Comment #3 from Martin Sebor ---
The warning does just what it's designed to do: point out the potential
unhandled truncation. If the argument values are such that the truncation
cannot occur then using snprintf is unnecessary and sprintf ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354
--- Comment #2 from Stephan Bergmann ---
But that makes this warning extremely hard to use. Is it really useful for
-Wall in that case?
I came across this with a real-world use-case in the LibreOffice code base,
where some code deliberately use
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354
Martin Sebor changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
11 matches
Mail list logo