[PATCH] Compilation warning - int64

Matthias Dieter Wallnöfer mdw at samba.org
Sat Dec 19 21:35:28 UTC 2015


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
>>>>
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: operational.patch
Type: application/mbox
Size: 923 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151219/60688603/operational.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: torture.patch
Type: application/mbox
Size: 1463 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151219/60688603/torture.mbox>


More information about the samba-technical mailing list