From: Benjamin Kaduk Date: Fri, 10 Jan 2014 04:38:36 +0000 (-0500) Subject: viced/callback.c: Ignore dump write errors even harder X-Git-Tag: upstream/1.8.0_pre1^2~834 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8105129987e2848f21247eea4103ae31772d68be;p=packages%2Fo%2Fopenafs.git viced/callback.c: Ignore dump write errors even harder Not only do we need to check the return value of write(2), but we also need to do so in a way that does not leave an empty body in the if statement, in order to appease the clang-500.2.79 found on OS X 10.9 with Xcode 5.0.2. Change-Id: I4564f05927fe14fea3365e9e250834ee948fe387 Reviewed-on: http://gerrit.openafs.org/10697 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/viced/callback.c b/src/viced/callback.c index 4944e7b1c..9d22156ce 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -2668,7 +2668,7 @@ cb_OldToNew(struct fs_dump_state * state, afs_uint32 old, afs_uint32 * new) } #endif /* AFS_DEMAND_ATTACH_FS */ -#define DumpBytes(fd,buf,req) if (write(fd, buf, req) < 0) ; /* don't care */ +#define DumpBytes(fd,buf,req) if (write(fd, buf, req) < 0) {} /* don't care */ static int DumpCallBackState_r(void)