]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
vol: remove [UN]LOCKFILE data loss warnings on Windows
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 20 Jan 2011 06:20:05 +0000 (01:20 -0500)
committerDerrick Brashear <shadow@dementia.org>
Fri, 4 Feb 2011 21:50:53 +0000 (13:50 -0800)
Cast to DWORD since the results of the mask and shift
are guaranteed to be 32-bit.  This avoids sixteen warnings.

Reviewed-on: http://gerrit.openafs.org/3695
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit fe9285f77a680b6e6d0995166f3c384aac676a8c)

Change-Id: Ic9a17074ce76d1676bb7d83e2e17d7c50e1c45a0
Reviewed-on: http://gerrit.openafs.org/3840
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/vol/ihandle.h

index 49721a49061b9d98470477bea9f3fa39bcc5a591..6fd6bc5cea21424748e4d88327dcd717479a1e8b 100644 (file)
@@ -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 "\\"