tigr
tigr copied to clipboard
Variable Shadowing Issue in tigr.c
(Apologies if I'm missing something obvious, I'm a novice)
Trying to learn TIGR so I started by building the hello example in my space. But on running make hello I get the following error:
tigr/tigr.c:1820:19: error: declaration shadows a local variable [-Werror,-Wshadow]
TigrGlyph g = font->glyphs[i];
^
tigr/tigr.c:1730:16: note: previous declaration is here
TigrGlyph* g;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 errors generated.
make: *** [Makefile:13: hello] Error 1
Straightforward error, I imagine it's caused by a compiler difference (I'm using Clang). Probably easy to fix.
Looks like there are multiple instances of this variable shadowing issue. Very disturbing.
There might be variable shadowing and other issues, true. But tigr builds cleanly with -Wall -pedantic, which is good enough for me.