This patch fixes two 'autological-constant-out-of-range-compare' clang
warnings caused by comparing enum type variables with -1.
It's possible that compilers optimize these two comparisons away.
Signed-off-by: Zifei Tong <zifeitong@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
}
type->opt = &ctx_opts[index];
- if (type->opt->ctx_type == -1) {
+ if (type->opt->symbol == NULL) {
ERR("Unknown context type %s", opt_type);
free(type);
ret = CMD_ERROR;
if (chan.attr.read_timer_interval == -1) {
chan.attr.read_timer_interval = default_attr.read_timer_interval;
}
- if (chan.attr.output == -1) {
+ if ((int) chan.attr.output == -1) {
chan.attr.output = default_attr.output;
}
if (chan.attr.tracefile_count == -1) {