From: Simon Wilkinson Date: Fri, 30 Mar 2012 18:27:30 +0000 (+0100) Subject: vice & vol: Cast FDH_SYNC results to void X-Git-Tag: upstream/1.8.0_pre1^2~2614 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a0af50a9dcab6935ad7701b81e76cab750633615;p=packages%2Fo%2Fopenafs.git vice & vol: Cast FDH_SYNC results to void 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 Tested-by: Derrick Brashear --- diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 0d8857fb2..93b3d71ae 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -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; diff --git a/src/vol/clone.c b/src/vol/clone.c index b3a3abdf3..9d62c9746 100644 --- a/src/vol/clone.c +++ b/src/vol/clone.c @@ -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); } diff --git a/src/vol/namei_ops.c b/src/vol/namei_ops.c index 1f36d9b1b..cd749c22f 100644 --- a/src/vol/namei_ops.c +++ b/src/vol/namei_ops.c @@ -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;