aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org>2020-12-29 22:07:34 +0100
committerGravatar Steven Schubiger <stsc@refcnt.org>2020-12-29 22:07:34 +0100
commit4709972f1cfb9f69f631207d9e8c925e9dbf0797 (patch)
treea64da86c67348f22f7845574328af5c853e6d029
parentd9543bc46d5006a78001d6b0e5874ec89940fe4e (diff)
downloadcolorize-4709972f1cfb9f69f631207d9e8c925e9dbf0797.tar.gz
colorize-4709972f1cfb9f69f631207d9e8c925e9dbf0797.tar.bz2
Guard against fallthrough in switch statement
-rw-r--r--colorize.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/colorize.c b/colorize.c
index 2a8d843..b1d9ecc 100644
--- a/colorize.c
+++ b/colorize.c
@@ -969,8 +969,9 @@ cleanup (void)
fclose (var->ptr);
break;
case IS_UNUSED:
- default:
break;
+ default: /* never reached */
+ ABORT_TRACE ();
}
}
free_null (vars_list);
@@ -1936,8 +1937,8 @@ release (struct var_list *list, unsigned int stacked, void **ptr)
case IS_FILE:
fclose (*ptr);
break;
- default:
- break;
+ default: /* never reached */
+ ABORT_TRACE ();
}
*ptr = NULL;
var->ptr = NULL;