[PATCH:showfont 1/3] Rename row pointer to avoid shadowing row integer variable

Alan Coopersmith alan.coopersmith at oracle.com
Sat Nov 23 09:49:25 PST 2013


Fixes gcc warning:
showfont.c: In function ‘show_glyphs’:
showfont.c:261:18: warning: declaration of ‘row’ shadows a previous local [-Wshadow]
showfont.c:178:10: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 showfont.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/showfont.c b/showfont.c
index 4ba01a6..05895ac 100644
--- a/showfont.c
+++ b/showfont.c
@@ -258,10 +258,10 @@ show_glyphs(
 	    }
 	    offset = offsets[ch].position;
 	    for (r = 0; r < bottom; r++) {
-		unsigned char *row = glyphs + offset;
+		unsigned char *rowp = glyphs + offset;
 
 		for (b = 0; b < charwidth; b++) {
-		    putchar((row[b >> 3] &
+		    putchar((rowp[b >> 3] &
 			     (1 << (7 - (b & 7)))) ? '#' : '-');
 		}
 		putchar('\n');
-- 
1.7.9.2



More information about the xorg-devel mailing list