mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
a68: remove superfluous code detected by cppcheck [PR algol68/122954]
This commits fixes three instances of harmless but redundant code, detected by cppcheck. gcc/algol68/ChangeLog PR algol68/122954 * a68-low-clauses.cc (serial_clause_dsa): Avoid redundant initialization. * a68-parser-modes.cc (compute_derived_modes): Likewise. * a68-low.cc (a68_lower_tree): Remove redundant break.
This commit is contained in:
@@ -58,9 +58,7 @@
|
||||
static bool
|
||||
serial_clause_dsa (NODE_T *p)
|
||||
{
|
||||
NODE_T *s = NEXT (SUB (p));
|
||||
|
||||
for (s = p; SUB (s) && IS (s, SERIAL_CLAUSE); s = SUB (s))
|
||||
for (NODE_T *s = p; SUB (s) && IS (s, SERIAL_CLAUSE); s = SUB (s))
|
||||
{
|
||||
if (DYNAMIC_STACK_ALLOCS (s))
|
||||
return true;
|
||||
|
||||
@@ -1479,7 +1479,6 @@ a68_lower_tree (NODE_T *p, LOW_CTX_T ctx)
|
||||
case PACKET:
|
||||
res = lower_packet (p, ctx);
|
||||
break;
|
||||
break;
|
||||
case PRELUDE_PACKET:
|
||||
res = lower_prelude_packet (p, ctx);
|
||||
break;
|
||||
|
||||
@@ -1202,10 +1202,9 @@ compute_derived_modes (MODULE_T *mod)
|
||||
|
||||
for (; s != NO_PACK; FORWARD (s))
|
||||
{
|
||||
PACK_T *t = NEXT (s);
|
||||
bool x = true;
|
||||
|
||||
for (t = NEXT (s); t != NO_PACK && x; FORWARD (t))
|
||||
for (PACK_T *t = NEXT (s); t != NO_PACK && x; FORWARD (t))
|
||||
{
|
||||
if (TEXT (s) == TEXT (t))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user