From fe9285f77a680b6e6d0995166f3c384aac676a8c Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 20 Jan 2011 01:20:05 -0500 Subject: [PATCH] vol: remove [UN]LOCKFILE data loss warnings on Windows Cast to DWORD since the results of the mask and shift are guaranteed to be 32-bit. This avoids sixteen warnings. Change-Id: Ifdb9356e207b4b8791b5923985a70efeb457edb1 Reviewed-on: http://gerrit.openafs.org/3695 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/vol/ihandle.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vol/ihandle.h b/src/vol/ihandle.h index 49721a490..6fd6bc5ce 100644 --- a/src/vol/ihandle.h +++ b/src/vol/ihandle.h @@ -378,8 +378,8 @@ extern ssize_t ih_pwrite(int fd, const void * buf, size_t count, afs_foff_t offs #define OS_PWRITE(FD, B, S, O) ih_pwrite(FD, B, S, O) #endif /* !HAVE_PIO */ #ifdef AFS_NT40_ENV -#define OS_LOCKFILE(FD, O) (!LockFile(FD, (O & 0xFFFFFFFF), (O >> 32), 2, 0)) -#define OS_UNLOCKFILE(FD, O) (!UnlockFile(FD, (O & 0xFFFFFFFF), (O >> 32), 2, 0)) +#define OS_LOCKFILE(FD, O) (!LockFile(FD, (DWORD)((O) & 0xFFFFFFFF), (DWORD)((O) >> 32), 2, 0)) +#define OS_UNLOCKFILE(FD, O) (!UnlockFile(FD, (DWORD)((O) & 0xFFFFFFFF), (DWORD)((O) >> 32), 2, 0)) #define OS_ERROR(X) nterr_nt2unix(GetLastError(), X) #define OS_UNLINK(X) nt_unlink(X) #define OS_DIRSEP "\\" -- 2.39.5