From a996bfdc120eba8e0041aeefe5d2fe2f48593723 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Tue, 20 Mar 2018 22:58:06 +0100 Subject: [PATCH] fix compiler warnings seen by clang --- lib/ecoli_log.c | 2 +- lib/main-readline.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ecoli_log.c b/lib/ecoli_log.c index 3f1525a..7dbf2c8 100644 --- a/lib/ecoli_log.c +++ b/lib/ecoli_log.c @@ -30,7 +30,7 @@ static enum ec_log_level global_level = EC_LOG_WARNING; int ec_log_level_set(enum ec_log_level level) { - if (level < 0 || level > EC_LOG_DEBUG) + if (level > EC_LOG_DEBUG) return -1; global_level = level; diff --git a/lib/main-readline.c b/lib/main-readline.c index 47a26fb..2c81c53 100644 --- a/lib/main-readline.c +++ b/lib/main-readline.c @@ -140,7 +140,7 @@ static int show_help(int ignore, int invoking_key) const struct ec_comp_group *grp, *prev_grp = NULL; const struct ec_comp_item *item; struct ec_comp *c = NULL; - struct ec_parse *p; + struct ec_parse *p = NULL; char *line = NULL; unsigned int count; char **helps = NULL; -- 2.39.5