summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-09-11 10:18:58 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-09-11 10:18:58 -0700
commitec22154c5014a8d5e496766202b4ec504953e957 (patch)
treeda78d45301d8cff86faa3b39b156a02f3c13f56b
parent1651502a43502da5ebbbfbd50b9f3cf0c709e8f8 (diff)
downloadxorg-app-xauth-ec22154c5014a8d5e496766202b4ec504953e957.tar.gz
Handle -Wempty-body warning for WRITES() macro
process.c:659:57: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] #define WRITES(fd, S) {if(write((fd), (S), strlen((S))));} ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/process.c b/process.c
index 1ed6cab..f2ea3a6 100644
--- a/process.c
+++ b/process.c
@@ -656,7 +656,7 @@ static volatile Bool dying = False;
/* poor man's puts(), for under signal handlers,
extended to ignore warn_unused_result */
-#define WRITES(fd, S) {if(write((fd), (S), strlen((S))));}
+#define WRITES(fd, S) {if(write((fd), (S), strlen((S)))){}}
/* ARGSUSED */
_X_NORETURN