WAITFIFO: add do { ... } while (0) to avoid -Wextra-semi-stmt warnings

Clears 17 warnings from clang of the form:

mga_video.c:739:17: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
    WAITFIFO(15);
                ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/15>
This commit is contained in:
Alan Coopersmith
2024-11-10 11:13:06 -08:00
committed by Marge Bot
parent 3b7e42e8b1
commit d55a8f77ab

View File

@@ -29,14 +29,15 @@ while(INREG(MGAREG_DWGSYNC) != MGA_SYNC_XTAG) ; \
#define MGAISBUSY() (INREG8(MGAREG_Status + 2) & 0x01)
#define WAITFIFO(cnt) \
#define WAITFIFO(cnt) do { \
if(!pMga->UsePCIRetry) {\
register int n = cnt; \
if(n > pMga->FifoSize) n = pMga->FifoSize; \
while(pMga->fifoCount < (n))\
pMga->fifoCount = INREG8(MGAREG_FIFOSTATUS);\
pMga->fifoCount -= n;\
}
} \
} while (0)
#define XYADDRESS(x,y) \
((y) * pMga->CurrentLayout.displayWidth + (x) + pMga->YDstOrg)