On Wed, 16 Jan 2013 10:21:03 -0800, Michael Sierchio wrote: > Top posting for brevity - the fact is, the code in your original > example is wrong. There are reasons to complain about argument size > mismatches, esp. in print functions that call (versions of) malloc. > You should cast the time_t value explicitly, or use %d instead of %ld.
This advice looks correct. If you use the source Luke, you'll find the following (taken from a 8.2-STABLE/i386 system source tree): /usr/src/sys/sys/types.h (line 253): typedef __time_t time_t; /usr/src/sys/i386/include/_types.h (line 97): typedef __int32_t __time_t; /usr/src/sys/i386/include/_types.h (line 55): typedef int __int32_t; So it boils down to (int), but %ld expects (long). This is the exact content of the warning. You can either case the (time_t) value to (long), or change %ld to %d to avoid the warning. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"