From eac885fa5ebff24e0839144863872443a010d7c2 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 1 Oct 2018 21:24:45 -0700 Subject: Stop shadowing 'found' in checkExtraEncoding() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mkfontscale.c: In function ‘checkExtraEncoding’: mkfontscale.c:1220:17: warning: declaration of ‘found’ shadows a parameter [-Wshadow] int found = 0; ^~~~~ mkfontscale.c:1214:59: note: shadowed declaration is here checkExtraEncoding(FT_Face face, char *encoding_name, int found) ^~~~~ Signed-off-by: Alan Coopersmith --- mkfontscale.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkfontscale.c b/mkfontscale.c index e5169b3..13cf648 100644 --- a/mkfontscale.c +++ b/mkfontscale.c @@ -1217,15 +1217,15 @@ checkExtraEncoding(FT_Face face, char *encoding_name, int found) if(strcasecmp(encoding_name, "iso10646-1") == 0) { if(doISO10646_1_encoding && find_cmap(FONT_ENCODING_UNICODE, -1, -1, face)) { - int found = 0; + int cfound = 0; /* Export as Unicode if there are at least 15 BMP characters that are not a space or ignored. */ for(c = 0x21; c < 0x10000; c++) { if(CODE_IGNORED(c)) continue; if(FT_Get_Char_Index(face, c) > 0) - found++; - if(found >= 15) + cfound++; + if(cfound >= 15) return 1; } return 0; -- cgit v1.2.3