On Sun, Jul 28, 2013 at 04:56:31PM +0000, Ian Lepore wrote:
> Author: ian
> Date: Sun Jul 28 16:56:31 2013
> New Revision: 253744
> URL: http://svnweb.freebsd.org/changeset/base/253744
> 
> Log:
>   Fix printf of seconds for systems where time_t is 64 bits.
> 
> Modified:
>   head/usr.sbin/watchdogd/watchdogd.c
> 
> Modified: head/usr.sbin/watchdogd/watchdogd.c
> ==============================================================================
> --- head/usr.sbin/watchdogd/watchdogd.c       Sun Jul 28 16:50:45 2013        
> (r253743)
> +++ head/usr.sbin/watchdogd/watchdogd.c       Sun Jul 28 16:56:31 2013        
> (r253744)
> @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
>  #include <paths.h>
>  #include <signal.h>
>  #include <stdio.h>
> +#include <stdint.h>
>  #include <stdlib.h>
>  #include <string.h>
>  #include <strings.h>
> @@ -230,10 +231,10 @@ parse_timeout_to_pow2ns(char opt, const 
>       if (debugging) {
>               printf("Timeout for %s%s "
>                   "is 2^%d nanoseconds "
> -                 "(in: %s sec -> out: %ld sec %ld ns -> %d ticks)\n",
> +                 "(in: %s sec -> out: %jd sec %ld ns -> %d ticks)\n",
>                   longopt ? "-" : "", longopt ? longopt : shortopt,
>                   rv,
> -                 myoptarg, ts.tv_sec, ts.tv_nsec, ticks);
> +                 myoptarg, (intmax_t)ts.tv_sec, ts.tv_nsec, ticks);

This breaks head/ for at least arm.

cc  -O -pipe  -std=gnu99 -Qunused-arguments -Wsystem-headers -Werror
-Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign
-Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare
-Wno-unused-value -Wno-parentheses-equality -Wno-unused-function
-Wno-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -o 
watch watch.o -ltermcap
gzip -cn /src/usr.sbin/watch/watch.8 > watch.8.gz
===> usr.sbin/watchdogd (all)
cc  -O -pipe  -std=gnu99 -Qunused-arguments -Wsystem-headers -Werror
-Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual
-Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align
-Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
-Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign
-Wno-empty-body -Wno-string-plus-int -c
/src/usr.sbin/watchdogd/watchdogd.c
/src/usr.sbin/watchdogd/watchdogd.c:236:17: error: format specifies type
'long' but the argument has type 'time_t' (aka 'long long')
[-Werror,-Wformat]
                    myoptarg, ts.tv_sec, ts.tv_nsec, ticks);
                              ^~~~~~~~~
1 error generated.
*** Error code 1

Stop.
bmake: stopped in /src/usr.sbin/watchdogd
*** Error code 1

http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-armv6-arm.full

Glen

Attachment: pgpbyp9Xe7BvX.pgp
Description: PGP signature

Reply via email to