EXPR_MAX was never updated to the newest expression, add __EXPR_MAX and
use it to define EXPR_MAX.
Add case to expr_ops() other gcc complains with a warning on the
__EXPR_MAX case is not handled.
Fixes: 347039f64509 ("src: add symbol range expression to further compact intervals")
Suggested-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
EXPR_FLAGCMP,
EXPR_RANGE_VALUE,
EXPR_RANGE_SYMBOL,
-
- EXPR_MAX = EXPR_FLAGCMP
+ __EXPR_MAX
};
+#define EXPR_MAX (__EXPR_MAX - 1)
enum ops {
OP_INVALID,
case EXPR_FLAGCMP: return &flagcmp_expr_ops;
case EXPR_RANGE_VALUE: return &constant_range_expr_ops;
case EXPR_RANGE_SYMBOL: return &symbol_range_expr_ops;
+ case __EXPR_MAX: break;
}
return NULL;