[Devel] Re: [PATCH 1/9] checkpoint: fix integer-pointer conversion warnings

Oren Laadan orenl at librato.com
Wed Sep 16 08:08:30 PDT 2009



Serge E. Hallyn wrote:
> Quoting Nathan Lynch (ntl at pobox.com):
>>   CC      checkpoint/process.o
>> checkpoint/process.c: In function ‘checkpoint_task_struct’:
>> checkpoint/process.c:97: warning: assignment makes integer from pointer without a cast
>> checkpoint/process.c:98: warning: assignment makes integer from pointer without a cast
>> checkpoint/process.c: In function ‘restore_task_struct’:
>> checkpoint/process.c:475: warning: assignment makes pointer from integer without a cast
>> checkpoint/process.c:476: warning: assignment makes pointer from integer without a cast
>>
>> Signed-off-by: Nathan Lynch <ntl at pobox.com>
>> ---
>>  checkpoint/process.c |    8 ++++----
>>  1 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/checkpoint/process.c b/checkpoint/process.c
>> index 41566db..b7f4a43 100644
>> --- a/checkpoint/process.c
>> +++ b/checkpoint/process.c
>> @@ -94,8 +94,8 @@ static int checkpoint_task_struct(struct ckpt_ctx *ctx, struct task_struct *t)
>>  		h->exit_signal = t->exit_signal;
>>  		h->pdeath_signal = t->pdeath_signal;
>>  
>> -		h->set_child_tid = t->set_child_tid;
>> -		h->clear_child_tid = t->clear_child_tid;
>> +		h->set_child_tid = (unsigned long)t->set_child_tid;
>> +		h->clear_child_tid = (unsigned long)t->clear_child_tid;
> 
> But it's defined as __u64 in checkpoint_hdr.h.  So on 32-bit this cast
> won't be right, right?

Should be harmless.

> 
> But a major ack to shutting this thing up.

Definitely. In fact, it's addressed already in the PGID patch :)

Oren.

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list