Re: [PATCH] lib/vsprintf: include stdarg.h from sprintf.h to provide va_list

From: Andy Shevchenko
Date: Wed Jul 02 2025 - 04:08:09 EST


On Tue, Jul 01, 2025 at 09:27:24PM -0700, Dmitry Torokhov wrote:
> Declarations in sprintf.h use va_list so it needs to include stdarg.h,
> otherwise we may be getting warnings like this:
>
> ./include/linux/sprintf.h:11:54: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
> 11 | __printf(2, 0) int vsprintf(char *buf, const char *, va_list);
> | ^
> | int

Ah, thanks for a good catch!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko