Re: [RFC] Prepend timestamp in msgbuf

From: Arnaud Lacombe <lacombar_at_gmail.com>
Date: Mon, 17 Oct 2011 16:13:15 -0400
Hi,

On Mon, Oct 17, 2011 at 3:38 PM, Garrett Cooper <yanegomi_at_gmail.com> wrote:
> On Mon, Oct 17, 2011 at 12:27 PM, Arnaud Lacombe <lacombar_at_gmail.com> wrote:
>> Hi,
>>
>> On Mon, Oct 17, 2011 at 2:01 PM, Alexander Best <arundel_at_freebsd.org> wrote:
>>> On Fri Oct 14 11, Arnaud Lacombe wrote:
>>> [...]
>>>
>>> cc -c -O -pipe -march=core2 -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -Wmissing-include-dirs -nostdinc  -I. -I/usr/git-freebsd-head/sys -I/usr/git-freebsd-head/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -fno-omit-frame-pointer -mno-sse -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fformat-extensions -fdiagnostics-show-option -fstack-protector -Werror  /usr/git-freebsd-head/sys/kern/subr_msgbuf.c
>>> cc1: warnings being treated as errors
>>> /usr/git-freebsd-head/sys/kern/subr_msgbuf.c: In function 'msgbuf_do_addchar':
>>> /usr/git-freebsd-head/sys/kern/subr_msgbuf.c:171: warning: format '%d' expects type 'int', but argument 4 has type 'time_t' [-Wformat]
>>> *** Error code 1
>>>
>>> Stop in /usr/obj/usr/git-freebsd-head/sys/ARUNDEL.
>>> *** Error code 1
>>>
>>> Stop in /usr/git-freebsd-head.
>>> *** Error code 1
>>>
>>> Stop in /usr/git-freebsd-head.
>>>
>> FreeBSD has no time_t PRI... macros in any <machine/_inttypes.h>,
>> eventually cast it to `long'.
>>
>> Btw, I appreciate the very clear message of yours, no "Hi", no
>> signature, no idea what "ARUNDEL" is, and especially no details on
>> which architecture you are attempting to build, which should be, I
>> assume, LP64 ;-)
>
>    time_t maps to int32_t on i386 and int64_t on amd64 (at least), so
> you should be able to use "%zd" in the format string as the type is
> variable width depending on the architecture.
>
make sense.

Thanks,
 - Arnaud
Received on Mon Oct 17 2011 - 18:13:17 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:19 UTC