From a078c3086fa47e05e3ffdc4e94ca202284a1487b Mon Sep 17 00:00:00 2001 From: arvinzzz Date: Thu, 20 May 2021 14:31:39 +0800 Subject: [PATCH] fix: The hook module fails to compile under the c99 compilation standard. close: #I3S4ME Change-Id: I335dde049e1646cb7fb32f8e156878994f254c8b --- utils/internal/los_hook_types_parse.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/internal/los_hook_types_parse.h b/utils/internal/los_hook_types_parse.h index e8407a2e..287ad81a 100644 --- a/utils/internal/los_hook_types_parse.h +++ b/utils/internal/los_hook_types_parse.h @@ -61,8 +61,10 @@ #define PARAM_TO_ARGS6(a, b, c, d, e, f) ARG(a), PARAM_TO_ARGS5(b, c, d, e, f) #define PARAM_TO_ARGS7(a, b, c, d, e, f, g) ARG(a), PARAM_TO_ARGS6(b, c, d, e, f, g) -#define __NARGS(a, b, c, d, e, f, g, h, n, ...) n -#define _NARGS(...) __NARGS(x, ##__VA_ARGS__, 7, 6, 5, 4, 3, 2, 1, 0, ) +#define _ZERO_ARGS 7, 6, 5, 4, 3, 2, 1, 0 +#define ___NARGS(a, b, c, d, e, f, g, h, n, ...) n +#define __NARGS(...) ___NARGS(__VA_ARGS__) +#define _NARGS(...) __NARGS(x, __VA_ARGS__##_ZERO_ARGS, 7, 6, 5, 4, 3, 2, 1, 0) #define __CONCAT(a, b) a##b #define _CONCAT(a, b) __CONCAT(a, b)