This will be used for -Wformat. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- lib.h | 5 +++++ verify-format.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib.h b/lib.h index b35debc83288..957586dbd80a 100644 --- a/lib.h +++ b/lib.h @@ -199,6 +199,11 @@ static inline struct expression *first_expression(struct expression_list *head) return first_ptr_list((struct ptr_list *)head); } +static inline struct expression *get_nth_expression(struct expression_list *head, unsigned int n) +{ + return ptr_list_nth_entry((struct ptr_list *)head, n); +} + static inline pseudo_t first_pseudo(struct pseudo_list *head) { return first_ptr_list((struct ptr_list *)head); diff --git a/verify-format.c b/verify-format.c index ba6cb5646dba..939605f55ef5 100644 --- a/verify-format.c +++ b/verify-format.c @@ -113,11 +113,6 @@ static struct format_type printf_fmt_ptr_ref = { .test = printf_fmt_pointer, }; -static struct expression *get_nth_expression(struct expression_list *args, int nr) -{ - return ptr_list_nth_entry((struct ptr_list *)args, nr); -} - static int is_float_spec(char t) { return t == 'f' || t == 'g' || t == 'F' || t == 'G'; -- 2.28.0