This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix build failure due to compiler warning.
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: davem at davemloft dot net
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 23 Nov 2011 15:41:33 +0100 (CET)
- Subject: Re: [PATCH] Fix build failure due to compiler warning.
- References: <20111116.011217.835882743635387092.davem@davemloft.net>
> Date: Wed, 16 Nov 2011 01:12:17 -0500 (EST)
> From: David Miller <davem@davemloft.net>
>
> On Sparc/Linux, __suseconds_t is not a type compatible with 'long' so
> these printf statements trigger a warning and thus a build failure.
>
> This mirrors the casting already being done for the same exact reason
> in vprintf_unfiltered.
>
> Ok to commit?
Not sure if you already committed this, but "long int" sounds a bit
pedantic, so I'd prefer to see this with "long". But either way, this
is ok.
> 2011-11-15 David S. Miller <davem@davemloft.net>
>
> * utils.c (report_command_stats): Cast delta_wall_time 'tv_sec' and
> 'tv_usec' to long for printf since these fields have a type which
> varies.