Re: [PATCH] lpfc: use %zd format string for size_t

From: Arnd Bergmann
Date: Fri Oct 28 2016 - 17:50:23 EST


On Friday, October 28, 2016 2:44:13 PM CEST Vineet Gupta wrote:
>
> Indeed if I hack include/linux/types.h
>
> -typedef __kernel_size_t size_t;
> +typedef unsigned long size_t;
>
> then the warning goes away, so gcc is indeed assuming size_t to be unsigned long
> and not unsigned int. That helps a lot.

Ok, just be aware that this will introduce warnings for any
compiler that is built to expect an 'unsigned int size_t'
typedef.

Arnd