[gl2ps] index conflicts with <string.h> header file
Daniel J Sebald
daniel.sebald at ieee.org
Fri Aug 24 00:41:47 CEST 2012
Hello gl2ps Developers,
In gl2ps.c are a few instances of a variable called "index". There is a
global name "index" via <string.h> header that creates a
shadow-global-name warning when compiled. A simple fix is to change the
name of the variable in a half dozen places.
gl2ps.c: In function 'gl2psListPointer':
gl2ps.c:573:54: warning: declaration of 'index' shadows a global declaration
gl2ps.c: In function 'gl2psFindRoot':
gl2ps.c:1409:38: warning: declaration of 'index' shadows a global
declaration
gl2ps.c: In function 'gl2psBuildBspTree':
gl2ps.c:1525:12: warning: declaration of 'index' shadows a global
declaration
gl2ps.c: In function 'gl2psPrintPostScriptBeginViewport':
gl2ps.c:3117:9: warning: declaration of 'index' shadows a global declaration
gl2ps.c: In function 'gl2psPrintPDFBeginViewport':
gl2ps.c:4761:9: warning: declaration of 'index' shadows a global declaration
gl2ps.c: In function 'gl2psPrintSVGBeginViewport':
gl2ps.c:5196:9: warning: declaration of 'index' shadows a global declaration
gl2ps.c: In function 'gl2psPrintPGFBeginViewport':
gl2ps.c:5426:9: warning: declaration of 'index' shadows a global declaration
gl2ps.c: In function 'gl2psBeginPage':
gl2ps.c:5613:9: warning: declaration of 'index' shadows a global declaration
Dan Sebald