From d61ba23c36d5127dfdf9c10ac8bc1a0429ed9e30 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Wed, 1 Jul 2015 10:41:34 +1200 Subject: [PATCH] Use uintptr_t for pointer int cast in SMBC_getdents_ctx() On i386, unsigned long long is 64 bit while the pointer is 32, and this fails under autobuild with -WError. Signed-off-by: Douglas Bagnall Reviewed-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Jul 21 05:14:20 CEST 2015 on sn-devel-104 --- source3/libsmb/libsmb_dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c index 636e0cc3bcb..97ecaa405a7 100644 --- a/source3/libsmb/libsmb_dir.c +++ b/source3/libsmb/libsmb_dir.c @@ -1129,7 +1129,7 @@ SMBC_getdents_ctx(SMBCCTX *context, /* Try and align the struct for the next entry on a valid pointer boundary by appending zeros */ - while((rem > 0) && ((unsigned long long)ndir & (sizeof(void*) - 1))) { + while((rem > 0) && ((uintptr_t)ndir & (sizeof(void*) - 1))) { *ndir = '\0'; rem--; ndir++; -- 2.11.4.GIT