[PATCH] Compilation warning
Matthias Dieter Wallnöfer
mdw at samba.org
Thu Sep 10 18:36:29 UTC 2015
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 --------------
commit 167096d815c96d8092384bffb8a4ed27dafe91a0
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Aug 8 20:54:48 2015 +0200
s4:operational LDB module - "maxPwdAge" constant
It is bigger than 32 bit long (= int), hence needs to be declared as ULL.
Signed-off-by: Matthias Dieter Wallnöfer <mdw at samba.org>
diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c
index 8390230..3adb223 100644
--- a/source4/dsdb/samdb/ldb_modules/operational.c
+++ b/source4/dsdb/samdb/ldb_modules/operational.c
@@ -708,14 +708,14 @@ static NTTIME get_msds_user_password_expiry_time_computed(struct ldb_module *mod
*
* Possible values are in the range of:
*
- * maxPwdAge: -864000000001
+ * maxPwdAge: -864000000001 (-0xC92A69C001ULL)
* to
* maxPwdAge: -9223372036854775808 (-0x8000000000000000ULL)
*
*/
maxPwdAge = samdb_search_int64(ldb_module_get_ctx(module), msg, 0,
domain_dn, "maxPwdAge", NULL);
- if (maxPwdAge >= -864000000000) {
+ if (maxPwdAge >= -864000000000ULL) {
/*
* This is not really possible...
*/
commit 6331c247aa0702540c79127d44503a5fb6ac5f92
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Aug 1 23:18:28 2015 +0200
s4:torture/ndr/samr.c - 64 bit unsigned long long constants
Signed-off-by: Matthias Dieter Wallnöfer <mdw at samba.org>
diff --git a/source4/torture/ndr/samr.c b/source4/torture/ndr/samr.c
index 91bb4d7..589ce72 100644
--- a/source4/torture/ndr/samr.c
+++ b/source4/torture/ndr/samr.c
@@ -294,8 +294,8 @@ static bool samr_changepassworduser3_w2k8r2_out_check(struct torture_context *tc
torture_assert_int_equal(tctx, dominfo->min_password_length, 7, "min_password_length");
torture_assert_int_equal(tctx, dominfo->password_history_length, 0, "password_history_length");
torture_assert_int_equal(tctx, dominfo->password_properties, DOMAIN_PASSWORD_COMPLEX, "password_properties");
- 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");
torture_assert_int_equal(tctx, reject->extendedFailureReason, SAM_PWD_CHANGE_NOT_COMPLEX, "extendedFailureReason");
torture_assert_int_equal(tctx, reject->filterModuleName.length, 0, "filterModuleName.length");
More information about the samba-technical
mailing list