]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
vice & vol: Cast FDH_SYNC results to void
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 30 Mar 2012 18:27:30 +0000 (19:27 +0100)
committerDerrick Brashear <shadow@dementix.org>
Sun, 8 Apr 2012 01:28:23 +0000 (18:28 -0700)
FDH_SYNC is a macro which returns a result. This leads to clang
complaining about an unused expression when the macro is expanded.
Avoid this by just casting the macro result to (void) when we aren't
interested in it.

Change-Id: I99eaac7432211d6b0cab10c3e1af0c6d4e2092a8
Reviewed-on: http://gerrit.openafs.org/7081
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
src/viced/afsfileprocs.c
src/vol/clone.c
src/vol/namei_ops.c

index 0d8857fb2f1afcbe9f23073dd1f0365970349dee..93b3d71ae35a513e1a30177a3ab33b4f64f474f6 100644 (file)
@@ -6555,7 +6555,7 @@ StoreData_RXStyle(Volume * volptr, Vnode * targetptr, struct AFSFid * Fid,
     FreeSendBuffer((struct afs_buffer *)tbuffer);
 #endif /* HAVE_PIOV */
     if (sync) {
-       FDH_SYNC(fdP);
+       (void) FDH_SYNC(fdP);
     }
     if (errorCode) {
        Error tmp_errorCode = 0;
index b3a3abdf3072581b941920b6c0238fa99f678c64..9d62c97460d8240ee9b4448e34517df8d847c2c0 100644 (file)
@@ -387,7 +387,7 @@ DoCloneIndex(Volume * rwvp, Volume * clvp, VnodeClass class, int reclone)
                error = FDH_TRUNC(rwFd, offset);
            }
        }
-       FDH_SYNC(rwFd);
+       (void)FDH_SYNC(rwFd);
        FDH_CLOSE(rwFd);
     }
 
index 1f36d9b1b729dd0e9308cd77f043a27c4bc44f32..cd749c22fae28fb6d322e053b380f8d9876269f5 100644 (file)
@@ -1483,7 +1483,7 @@ GetFreeTag(IHandle_t * ih, int vno)
     if (FDH_PWRITE(fdP, (char *)&row, sizeof(row), offset) != sizeof(row)) {
        goto badGetFreeTag;
     }
-    FDH_SYNC(fdP);
+    (void)FDH_SYNC(fdP);
     FDH_UNLOCKFILE(fdP, offset);
     FDH_CLOSE(fdP);
     return col;
@@ -1535,7 +1535,7 @@ namei_SetLinkCount(FdHandle_t * fdP, Inode ino, int count, int locked)
        errno = OS_ERROR(EBADF);
        goto bad_SetLinkCount;
     }
-    FDH_SYNC(fdP);
+    (void)FDH_SYNC(fdP);
 
     nBytes = 0;