From b3de64d368dbcdccfb65b651693a9584b1e72db7 Mon Sep 17 00:00:00 2001 From: Junior Polegato Date: Thu, 10 Sep 2015 10:01:32 -0300 Subject: [PATCH] Resolve directly and %lu to size_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /usr/src/linux-headers-4.1.0-2-common/include/acpi/platform/aclinux.h:52:2: error: #error "Please don't include directly, include instead." #error "Please don't include directly, include instead." ^ /tmp/acpi_call/acpi_call.c: In function ‘acpi_proc_write’: /tmp/acpi_call/acpi_call.c:273:9: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ [-Wformat=] printk(KERN_ERR "acpi_call: Input too long! (%lu)\n", len); ^ --- acpi_call.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/acpi_call.c b/acpi_call.c index 3025d97..a5e5632 100644 --- a/acpi_call.c +++ b/acpi_call.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include MODULE_LICENSE("GPL"); @@ -270,7 +270,11 @@ static int acpi_proc_write( struct file *filp, const char __user *buff, char *method; if (len > sizeof(input) - 1) { +#ifdef HAVE_PROC_CREATE + printk(KERN_ERR "acpi_call: Input too long! (%u)\n", len); +#else printk(KERN_ERR "acpi_call: Input too long! (%lu)\n", len); +#endif return -ENOSPC; }