[PATCH] Fix missing else keyword seen with clang-static-analyzer:
Martin Liška
mliska@suse.cz
Mon Jun 24 13:13:00 GMT 2019
Hi.
The patch is fixing following clang-static-analyzer error:
/home/marxin/Programming/gcc/gcc/bb-reorder.c:1031:2: warning: Value stored to 'is_better_edge' is never read
is_better_edge = true;
^ ~~~~
/home/marxin/Programming/gcc/gcc/bb-reorder.c:1034:2: warning: Value stored to 'is_better_edge' is never read
is_better_edge = false;
^ ~~~~~
It seems to me a missing else branch.
Honza?
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
Ready to be installed?
Thanks,
Martin
gcc/ChangeLog:
2019-06-24 Martin Liska <mliska@suse.cz>
* bb-reorder.c (connect_better_edge_p): Add missing else
statement in the middle of if-else statements.
---
gcc/bb-reorder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-missing-else-keyword-seen-with-clang-static-anal.patch
Type: text/x-patch
Size: 650 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190624/7cf12352/attachment.bin>
More information about the Gcc-patches
mailing list