From: Mike Yuan Date: Mon, 15 Dec 2025 23:02:01 +0000 (+0100) Subject: macro: add 22nd case for IN_SET X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb5c6dc599170ef9d2a4569e69d337baf072a7f4;p=thirdparty%2Fsystemd.git macro: add 22nd case for IN_SET Dejavu moment ;) --- diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro-fundamental.h index 9eebbfb2a9a..e8757b1fc37 100644 --- a/src/fundamental/macro-fundamental.h +++ b/src/fundamental/macro-fundamental.h @@ -351,10 +351,11 @@ assert_cc(sizeof(long long) == sizeof(intmax_t)); #define CASE_F_19(X, ...) case X: CASE_F_18( __VA_ARGS__) #define CASE_F_20(X, ...) case X: CASE_F_19( __VA_ARGS__) #define CASE_F_21(X, ...) case X: CASE_F_20( __VA_ARGS__) +#define CASE_F_22(X, ...) case X: CASE_F_21( __VA_ARGS__) -#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,NAME,...) NAME +#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,NAME,...) NAME #define FOR_EACH_MAKE_CASE(...) \ - GET_CASE_F(__VA_ARGS__,CASE_F_21,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12, \ + GET_CASE_F(__VA_ARGS__,CASE_F_22,CASE_F_21,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12, \ CASE_F_11,CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \ (__VA_ARGS__) @@ -364,7 +365,7 @@ assert_cc(sizeof(long long) == sizeof(intmax_t)); /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \ * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */ \ static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \ - assert_cc(ELEMENTSOF(__assert_in_set) <= 21); \ + assert_cc(ELEMENTSOF(__assert_in_set) <= 22); \ switch (x) { \ FOR_EACH_MAKE_CASE(first, __VA_ARGS__) \ _found = true; \