From adda00c31ae77da0d86b3e5dbd168cbf2917a3f0 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 9 Apr 2023 12:06:56 -0700 Subject: Handle -Wextra-semi-stmt warnings from clang Signed-off-by: Alan Coopersmith --- src/atimach64accel.c | 4 +++- src/atiutil.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/atimach64accel.c b/src/atimach64accel.c index f35af53..0453f22 100644 --- a/src/atimach64accel.c +++ b/src/atimach64accel.c @@ -67,13 +67,15 @@ /* Used to test MMIO cache integrity in ATIMach64Sync() */ #define TestRegisterCaching(_Register) \ + do { \ if (RegisterIsCached(_Register) && \ (CacheSlot(_Register) != inm(_Register))) \ { \ UncacheRegister(_Register); \ xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, \ #_Register " MMIO write cache disabled!\n"); \ - } + } \ + } while (0) /* * X-to-Mach64 mix translation table. diff --git a/src/atiutil.h b/src/atiutil.h index caa4b70..e807125 100644 --- a/src/atiutil.h +++ b/src/atiutil.h @@ -33,12 +33,12 @@ #define __ONE_MICROSECOND__ 100 /* This'll need calibration */ #define ATIDelay(_microseconds) \ - { \ + do { \ unsigned int _i, _j; \ for (_i = 0; _i < _microseconds; _i++) \ for (_j = 0; _j < __ONE_MICROSECOND__; _j++) \ /* Nothing */; \ - } + } while (0) /* * Macros to get/set a contiguous bit field. Arguments should not be -- cgit v1.2.3