mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
ACPI: OSL: add __printf format attribute to acpi_os_vprintf()
With gcc and W=1 option to compile the kernel, warning occurs: drivers/acpi/osl.c:156:2: error: function ‘acpi_os_vprintf’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]. Allow the compiler to recognize and check format strings is safer. Signed-off-by: Su Hui <suhui@nfschina.com> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
ce9ecca023
commit
83f5ad58da
@ -149,7 +149,7 @@ void acpi_os_printf(const char *fmt, ...)
|
||||
}
|
||||
EXPORT_SYMBOL(acpi_os_printf);
|
||||
|
||||
void acpi_os_vprintf(const char *fmt, va_list args)
|
||||
void __printf(1, 0) acpi_os_vprintf(const char *fmt, va_list args)
|
||||
{
|
||||
static char buffer[512];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user