mirror of
https://github.com/X11Libre/xf86-video-mga.git
synced 2026-03-24 01:24:13 +00:00
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:
committed by
Marge Bot
parent
3b7e42e8b1
commit
d55a8f77ab
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user