[Nouveau] [PATCH xf86-video-nouveau 1/2] xv: Avoid shadowed declaration of 'int i' in NVPutImage
Rhys Kidd
rhyskidd at gmail.com
Mon Jan 21 02:31:18 UTC 2019
int i is accessed outside immediate scope so leave declaration at
the highest common scope level:
1073: int ret, i;
...
// Highest common scope
...
1193: if (newTTSize <= destination_buffer->size) {
...
// Used in this scope
...
1248: } else {
...
// Used in this scope
...
1316: }
// Not used in this scope
Warning reported by gcc 8.2:
nouveau_xv.c: In function ‘NVPutImage’:
nouveau_xv.c:1195:7: warning: declaration of ‘i’ shadows a previous local [-Wshadow]
int i = 0;
^
nouveau_xv.c:1073:11: note: shadowed declaration is here
int ret, i;
^
Signed-off-by: Rhys Kidd <rhyskidd at gmail.com>
---
src/nouveau_xv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
index a7ec21a..1afe2f1 100644
--- a/src/nouveau_xv.c
+++ b/src/nouveau_xv.c
@@ -1192,7 +1192,6 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x,
if (newTTSize <= destination_buffer->size) {
unsigned char *dst;
- int i = 0;
/* Upload to GART */
nouveau_bo_map(destination_buffer, NOUVEAU_BO_WR, pNv->client);
--
2.19.1
More information about the Nouveau
mailing list