summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-17 13:07:46 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-17 13:07:46 -0800
commitd91187b820c7b7828887e1dd003328952be1abc5 (patch)
tree9bcf2c30e81a380bd40eb8ac5ae688b1a78dc556
parent163bf69ef8ed7b05cabf5ac5d6c3e5afe5316322 (diff)
Fix warning: declaration of ‘tmp’ shadows a previous local [-Wshadow]
In file included from ark_driver.c:43: ark_driver.c: In function ‘ARKPreInit’: ark.h:90:23: warning: declaration of ‘tmp’ shadows a previous local [-Wshadow] 90 | unsigned char tmp; \ | ^~~ ark_driver.c:364:9: note: in expansion of macro ‘modinx’ 364 | modinx(PIOOFFSET + 0x3c4, 0x1d, 0x01, 0x01); | ^~~~~~ ark_driver.c:246:23: note: shadowed declaration is here 246 | unsigned char tmp; | ^~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/ark.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ark.h b/src/ark.h
index ba94b1a..37fd2e8 100644
--- a/src/ark.h
+++ b/src/ark.h
@@ -87,9 +87,9 @@ Bool ARKAccelInit(ScreenPtr pScreen);
} while(0)
#define modinx(port, ind, mask, bits) \
do { \
- unsigned char tmp; \
- tmp = (rdinx((port), (ind)) & ~(mask)) | ((bits) & (mask)); \
- wrinx((port), (ind), tmp); \
+ unsigned char tmpc; \
+ tmpc = (rdinx((port), (ind)) & ~(mask)) | ((bits) & (mask)); \
+ wrinx((port), (ind), tmpc); \
} while(0)
#endif /* _ARK_H */