From: Olivier Matz Date: Tue, 20 Mar 2018 21:58:06 +0000 (+0100) Subject: fix compiler warnings seen by clang X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a996bfdc120eba8e0041aeefe5d2fe2f48593723;p=protos%2Flibecoli.git fix compiler warnings seen by clang --- 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;