diff options
-rw-r--r-- | tools/gcc-plugins/frr-format.c | 2 | ||||
-rw-r--r-- | tools/gcc-plugins/gcc-common.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/tools/gcc-plugins/frr-format.c b/tools/gcc-plugins/frr-format.c index e9f397f22..0a24b091a 100644 --- a/tools/gcc-plugins/frr-format.c +++ b/tools/gcc-plugins/frr-format.c @@ -1042,7 +1042,7 @@ check_format_info (function_format_info *info, tree params, format_ctx.arglocs = arglocs; check_function_arguments_recurse (check_format_arg, &format_ctx, - format_tree, arg_num); + format_tree, arg_num, OPT_Wformat_); location_t loc = format_ctx.res->format_string_loc; diff --git a/tools/gcc-plugins/gcc-common.h b/tools/gcc-plugins/gcc-common.h index ec45de1a5..9f59447d6 100644 --- a/tools/gcc-plugins/gcc-common.h +++ b/tools/gcc-plugins/gcc-common.h @@ -982,4 +982,9 @@ static inline void debug_gimple_stmt(const_gimple s) #define SET_DECL_MODE(decl, mode) DECL_MODE(decl) = (mode) #endif +#if BUILDING_GCC_VERSION < 12000 +#define check_function_arguments_recurse(arg, ctx, tree, num, opt) \ + check_function_arguments_recurse(arg, ctx, tree, num) +#endif + #endif |