summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-06-18 12:18:18 +0200
committerMarge Bot <emma+marge@anholt.net>2024-06-23 22:02:44 +0000
commiteaf2d77c324d64a8cd94c61daa3a477c3fbd1cf3 (patch)
tree0f99d49a0d2c024ab90f177b44797cc9fa163803
parenta7a04dd0af405a6872bb53fca3d5fdd89ab87eef (diff)
fix warning on shadowed global symbolHEADmaster
../../src/wsfb_driver.c: In function 'WsfbCopyRGB16ToYUY2': ../../src/wsfb_driver.c:1362:18: warning: declaration of 'rgb' shadows a global declaration [-Wshadow] 1362 | const uint16_t rgb = ((rgb0 >> 1) & ~0x8410) + | ^~~ In file included from /usr/local/X11/include/xorg/xf86.h:46, from ../../src/wsfb_driver.c:52: /usr/local/X11/include/xorg/xf86str.h:114:3: note: shadowed declaration is here 114 | } rgb; | ^~~ Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-wsfb/-/merge_requests/10>
-rw-r--r--src/wsfb_driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wsfb_driver.c b/src/wsfb_driver.c
index 0517dec..a0274ea 100644
--- a/src/wsfb_driver.c
+++ b/src/wsfb_driver.c
@@ -1359,13 +1359,13 @@ WsfbCopyRGB16ToYUY2(void *dest, void *src, int len)
while (len > 0) {
const uint16_t rgb0 = src16[0];
const uint16_t rgb1 = src16[1];
- const uint16_t rgb = ((rgb0 >> 1) & ~0x8410) +
+ const uint16_t rgbv = ((rgb0 >> 1) & ~0x8410) +
((rgb1 >> 1) & ~0x8410) +
((rgb0 & rgb1) & 0x0841);
const uint32_t y0 = mapRGB16ToY[rgb0];
const uint32_t y1 = mapRGB16ToY[rgb1];
- const uint32_t u = mapRGB16ToU[rgb];
- const uint32_t v = mapRGB16ToV[rgb];
+ const uint32_t u = mapRGB16ToU[rgbv];
+ const uint32_t v = mapRGB16ToV[rgbv];
*dest32 = (y0 << 24) | (u << 16) | (y1 << 8) | v;