expression: add __EXPR_MAX and use it to define EXPR_MAX
Pablo Neira Ayuso
maintainerPATCH 1/1 expression: add __EXPR_MAX and use it to define EXPR_MAX
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 <[email protected]>
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- include/expression.h | 4 ++-- src/expression.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
include/expression.h +2 -2
@@ -84,9 +84,9 @@ enum expr_types {EXPR_FLAGCMP ,EXPR_RANGE_VALUE ,EXPR_RANGE_SYMBOL , - -EXPR_MAX =EXPR_FLAGCMP + __EXPR_MAX }; +#define EXPR_MAX (__EXPR_MAX - 1)enum ops { OP_INVALID,
src/expression.c +1 -0
@@ -1794,6 +1794,7 @@ static const struct expr_ops *__expr_ops_by_type(enum expr_types etype)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 ;
Signature · 1 line
2.30.2