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 0d8857f..93b3d71 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 b3a3abd..9d62c97 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 1f36d9b..cd749c2 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;