[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libvirt] [PATCH libvirt 6/6] Cast timeval.tv_sec long to localtime

From: Eric Blake
Subject: Re: [libvirt] [PATCH libvirt 6/6] Cast timeval.tv_sec long to localtime expected type time_t
Date: Wed, 25 Jan 2012 18:05:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

[adding bug-gnulib]

On 01/25/2012 01:13 PM, Marc-André Lureau wrote:
> ---
>  tools/virsh.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> diff --git a/tools/virsh.c b/tools/virsh.c
> index 999941c..246e638 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -3703,7 +3703,7 @@ vshGenFileName(vshControl *ctl, virDomainPtr dom, const 
> char *mime)
>      /* add mime type here */
>      gettimeofday(&cur_time, NULL);
> -    localtime_r(&cur_time.tv_sec, &time_info);
> +    localtime_r((time_t *)&cur_time.tv_sec, &time_info);

NAK.  tv_sec should already be time_t.  This is a bug in your system
header definition of 'struct timespec', or in something that gnulib has
done to that struct in the meantime; and we should make gnulib work
around it if we can't get if fixed in mingw.

Can you help us identify why we are getting a type mismatch warning from
the compiler in the first place?

Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]