Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jul 2013 14:42:04 -0400
From:      Glen Barber <gjb@FreeBSD.org>
To:        Ian Lepore <ian@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r253744 - head/usr.sbin/watchdogd
Message-ID:  <20130728184204.GI2272@glenbarber.us>
In-Reply-To: <201307281656.r6SGuVYx023459@svn.freebsd.org>
References:  <201307281656.r6SGuVYx023459@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--GN/IAAAoV4GJoJGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
>=20
> Log:
>   Fix printf of seconds for systems where time_t is 64 bits.
>=20
> Modified:
>   head/usr.sbin/watchdogd/watchdogd.c
>=20
> Modified: head/usr.sbin/watchdogd/watchdogd.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- 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=20
>  	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=3Dgnu99 -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
=3D=3D=3D> usr.sbin/watchdogd (all)
cc  -O -pipe  -std=3Dgnu99 -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


--GN/IAAAoV4GJoJGS
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iQEcBAEBCAAGBQJR9WX8AAoJEFJPDDeguUajZoEIAIBxQ/vYa8/d9DVVxpMeA2Hq
l6HfdpHsHR4IhjBwOVMpKopYHOZGxRyzr/w4h5zAarN7L3Xy8gwxGuPbd/Iq15eK
56Bkxst49f5HUHl7qGcvjVgwdU1FFqjT5S1Djx7h6FK1N9Qe/Zc4HZdXZTIGK3JZ
zKvj0xVOlphd/cy7xTxRhiMf8Y91e6WwFBfvZ6pTI6t4/zMu3IdHq4MzJBx8TsQm
8ejnctyjjodoCwAMSWEfjxm/POol2JmP3KZW8dUoytBQ3c3NWsdlUo0BwWakg9ll
UOckNSy3zdr08PUlYyHNqmixZAq4ic9sQh3l3LlA9tYqCuC/q/ONsCEwjRT8F60=
=3q9i
-----END PGP SIGNATURE-----

--GN/IAAAoV4GJoJGS--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130728184204.GI2272>