public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3268] Avoid valid Coverity warning for comparing array to zero.
@ 2021-08-31 17:25 Martin Sebor
0 siblings, 0 replies; only message in thread
From: Martin Sebor @ 2021-08-31 17:25 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b3aa3288a958a75744df256d70e7f8e90ccab724
commit r12-3268-gb3aa3288a958a75744df256d70e7f8e90ccab724
Author: Martin Sebor <msebor@redhat.com>
Date: Tue Aug 31 11:16:37 2021 -0600
Avoid valid Coverity warning for comparing array to zero.
* gimple-ssa-warn-access.cc (maybe_warn_alloc_args_overflow): Test
pointer element for equality to zero, not that of the cotaining
array.
Diff:
---
gcc/gimple-ssa-warn-access.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/gimple-ssa-warn-access.cc b/gcc/gimple-ssa-warn-access.cc
index 5df97a6473a..5a359587ed3 100644
--- a/gcc/gimple-ssa-warn-access.cc
+++ b/gcc/gimple-ssa-warn-access.cc
@@ -2433,7 +2433,7 @@ maybe_warn_alloc_args_overflow (gimple *stmt, const tree args[2],
}
}
- if (!argrange[0])
+ if (!argrange[0][0])
return;
/* For a two-argument alloc_size, validate the product of the two
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-31 17:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 17:25 [gcc r12-3268] Avoid valid Coverity warning for comparing array to zero Martin Sebor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).