[parisc-linux] warning: long unsigned int format, time_t arg

John David Anglin dave@hiauly1.hia.nrc.ca
Sun, 21 Sep 2003 14:46:20 -0400 (EDT)


>                  rc = snprintf(out_ptr, out_end - out_ptr,
> -                          "%lu", tv.tv_sec);
> +                          "%lu", (unsigned long int)tv.tv_sec);

This looks ok to me, although you don't need the extra "int".

I noticed in include/asm-parisc/posix_types.h we have:

/* Note these change from narrow to wide kernels */
#ifdef __LP64__
typedef unsigned long           __kernel_size_t;
typedef long                    __kernel_ssize_t;
typedef long                    __kernel_ptrdiff_t;
typedef long                    __kernel_time_t;
#else
typedef unsigned int            __kernel_size_t;
typedef int                     __kernel_ssize_t;
typedef int                     __kernel_ptrdiff_t;
typedef int                     __kernel_time_t;
#endif

On narrow kernels, int and long are the same.  So, why not use long
for both narrow and wide?  Then, the ifdef can be eliminated.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)