]> git.sur5r.net Git - u-boot/commitdiff
arc: Fix printf size_t format related warnings (again...)
authorVasili Galka <vvv444@gmail.com>
Tue, 26 Aug 2014 10:44:22 +0000 (13:44 +0300)
committerAlexey Brodkin <abrodkin@synopsys.com>
Tue, 26 Aug 2014 13:41:58 +0000 (17:41 +0400)
The basic idea: Define size_t using the __SIZE_TYPE__ compiler-defined
type.

For detailed explanation see similar patch for the nios2 arch:
http://patchwork.ozlabs.org/patch/379938/

Signed-off-by: Vasili Galka <vvv444@gmail.com>
Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
arch/arc/include/asm/posix_types.h

index 20415f0705685730369ca3ba8d0f7b2b080cdcda..51347a48d4caa1b18af447f503e1c0cfab89e22e 100644 (file)
@@ -16,7 +16,11 @@ typedef int                  __kernel_pid_t;
 typedef unsigned short         __kernel_ipc_pid_t;
 typedef unsigned short         __kernel_uid_t;
 typedef unsigned short         __kernel_gid_t;
+#ifdef __GNUC__
+typedef __SIZE_TYPE__          __kernel_size_t;
+#else
 typedef unsigned int           __kernel_size_t;
+#endif
 typedef int                    __kernel_ssize_t;
 typedef int                    __kernel_ptrdiff_t;
 typedef long                   __kernel_time_t;