diff options
author | Martin Sebor <msebor@redhat.com> | 2021-08-31 11:16:37 -0600 |
---|---|---|
committer | Martin Sebor <msebor@redhat.com> | 2021-08-31 11:16:37 -0600 |
commit | b3aa3288a958a75744df256d70e7f8e90ccab724 (patch) | |
tree | fcaad72ef306b5f72d26c2be193d290e2ba10191 /gcc | |
parent | e4d2305adf4e9d11e396c1c5e5ae6214340cbcc2 (diff) | |
download | gcc-b3aa3288a958a75744df256d70e7f8e90ccab724.zip gcc-b3aa3288a958a75744df256d70e7f8e90ccab724.tar.gz gcc-b3aa3288a958a75744df256d70e7f8e90ccab724.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gimple-ssa-warn-access.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimple-ssa-warn-access.cc b/gcc/gimple-ssa-warn-access.cc index 5df97a6..5a35958 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 |