From d91187b820c7b7828887e1dd003328952be1abc5 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 17 Jan 2024 13:07:46 -0800 Subject: Fix warning: declaration of ‘tmp’ shadows a previous local [-Wshadow] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/ark.h | 6 +++--- 1 file 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 */ -- cgit v1.2.3