diff options
author | Rhys Kidd <rhyskidd@gmail.com> | 2019-01-20 21:31:18 -0500 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2019-01-20 21:44:50 -0500 |
commit | 22dd49f60be54c5649a9e80c87c9bfc99e2974b8 (patch) | |
tree | b7512d8b26f2b7f564b3104764f7a18ba02b9af3 | |
parent | d7ba24fb6e4fce43adc3c73369c5d1035ae080a9 (diff) | |
download | xorg-driver-xf86-video-nouveau-22dd49f60be54c5649a9e80c87c9bfc99e2974b8.tar.gz |
xv: Avoid shadowed declaration of 'int i' in NVPutImage
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@gmail.com>
-rw-r--r-- | src/nouveau_xv.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c index 3258ef7..e49b5ce 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); |