From ec22154c5014a8d5e496766202b4ec504953e957 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 11 Sep 2022 10:18:58 -0700 Subject: Handle -Wempty-body warning for WRITES() macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1