[PATCH] Compilation warning - int64
Andrew Bartlett
abartlet at samba.org
Thu Jan 7 03:57:48 UTC 2016
On Sat, 2015-12-19 at 22:35 +0100, Matthias Dieter Wallnöfer wrote:
> 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
Can you show the warning you got and explain how this fits with:
http://stackoverflow.com/questions/22852565/warning-integer-constant-is
-too-large-for-long-type
I don't see what the real-world problem is here, and in any case I
can't see a patch attached (perhaps just my client however).
I do appreciate your work, but is there any chance you can concentrate
on things like the great work you once did on samldb? That kind
of fiddly AD semantics is where we really need help.
Thanks,
Andrew Bartlett
--
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team https://samba.org
Samba Development and Support, Catalyst IT
https://catalyst.net.nz/services/samba
More information about the samba-technical
mailing list