fix compiler warnings seen by clang
authorOlivier Matz <zer0@droids-corp.org>
Tue, 20 Mar 2018 21:58:06 +0000 (22:58 +0100)
committerOlivier Matz <zer0@droids-corp.org>
Tue, 20 Mar 2018 21:58:06 +0000 (22:58 +0100)
lib/ecoli_log.c
lib/main-readline.c

index 3f1525a..7dbf2c8 100644 (file)
@@ -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;
 
index 47a26fb..2c81c53 100644 (file)
@@ -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;