mirror of
https://github.com/X11Libre/xf86-video-wsfb.git
synced 2026-03-24 01:25:29 +00:00
fix warning on shadowed global symbol
../../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>
This commit is contained in:
committed by
Marge Bot
parent
a7a04dd0af
commit
eaf2d77c32
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user