[PATCH] Compilation warning - int64

Matthias Dieter Wallnöfer mdw at samba.org
Mon Dec 28 20:46:00 UTC 2015


Andrew seems to be on holidays. Could anyone else take over the review,
please?

I would really enjoy to see this merged, since it is a serious issue on
32 bit platforms.

Thanks,
Matthias

Matthias Dieter Wallnöfer schrieb:
> Hi Andrew,
> 
> I had another careful look to my patch. You were right that it needed
> another review.
> 
> For the operational LDB module I maintained only this change:
>> -       if (maxPwdAge >= -864000000000) {
>> +       if (maxPwdAge >= -864000000000LL) {
> This constant needs to be a LL since it is not representable as 32-bit
> "long".
> 
> Also the torture part is needed since 0xffffdeff0aa68000 likewise does
> not fit into 32-bit long.
>> -       torture_assert_u64_equal(tctx, dominfo->max_password_age, 0xffffdeff0aa68000, "max_password_age");
>> -       torture_assert_u64_equal(tctx, dominfo->min_password_age, 0x0000000000000000, "min_password_age");
>> +       torture_assert_u64_equal(tctx, dominfo->max_password_age, 0xffffdeff0aa68000ULL, "max_password_age");
>> +       torture_assert_u64_equal(tctx, dominfo->min_password_age, 0x0000000000000000ULL, "min_password_age");
> 
> Let me know,
> 
> Matthias
> 
> Matthias Dieter Wallnöfer schrieb:
>> I would like to push this one if no one else objects...
>>
>> Matthias
>>
>> Matthias Dieter Wallnöfer schrieb:
>>> Andrew,
>>>
>>> please find attached the version without the hex constant.
>>>
>>> Matthias Dieter Wallnöfer schrieb:
>>>> Done.
>>>>
>>>> Andrew Bartlett schrieb:
>>>>> On Mon, 2015-09-07 at 22:00 +0200, Matthias Dieter Wallnöfer wrote:
>>>>>> Any chance to get a review for this patch?
>>>>> Can you sign off on them?  I also don't really like the negative ULL
>>>>> hex constant, it might be 'correct', but it just looks wrong. 
>>>>>
>>>>> Andrew Bartlett
>>>>>
>>
> 




More information about the samba-technical mailing list