WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] timer.c: Cast time value so that it has the corr

To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] timer.c: Cast time value so that it has the correct type
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 19 Aug 2010 15:46:44 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 19 Aug 2010 07:48:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100819143704.GI20252@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acs/rCxU7jHS/FasRaeadHwYiJ3lDQAASsrO
Thread-topic: [Xen-devel] [PATCH] timer.c: Cast time value so that it has the correct type
User-agent: Microsoft-Entourage/12.26.0.100708
This is my mistake, I'll do a patch to use the appropriate PRI macro.

 -- Keir

On 19/08/2010 15:37, "Tim Deegan" <Tim.Deegan@xxxxxxxxxx> wrote:

> At 15:13 +0100 on 19 Aug (1282230825), Ian Jackson wrote:
>> We'd prefer to avoid PRI macros in xen itself
> 
> I don't think we would; we even define a bunch of our own. :)
> 
>> , so instead we cast the
>> value to long to match the printf format.  Without this, the build
>> fails on some compilers.
> 
> This is the wrong fix; on PAE builds the value will be truncated from 64
> bits to 32.
> 
> Cheers,
> 
> Tim.
> 
>> Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
>> 
>> diff -r a05a2d559931 xen/common/timer.c
>> --- a/xen/common/timer.c Thu Aug 19 14:46:32 2010 +0100
>> +++ b/xen/common/timer.c Thu Aug 19 15:12:36 2010 +0100
>> @@ -500,7 +500,7 @@ static void dump_timer(struct timer *t,
>>  static void dump_timer(struct timer *t, s_time_t now)
>>  {
>>      printk("  ex=%8ldus timer=%p cb=%p(%p)",
>> -           (t->expires - now) / 1000, t, t->function, t->data);
>> +           (long)((t->expires - now) / 1000), t, t->function, t->data);
>>      print_symbol(" %s\n", (unsigned long)t->function);
>>  }
>>  
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>