diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2018-10-01 21:19:58 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2018-10-01 21:19:58 -0700 |
commit | 325621bd083236567bd861d41ff161313fc96e96 (patch) | |
tree | 3e4f90de6998e6bc68a2f6320dbfd1914d5d0fa7 | |
parent | 0faf882de6de6c1ec26aace9a9939914b40e7b89 (diff) |
Rename variable 'n' to avoid shadowing another 'n' in doDirectory
mkfontscale.c: In function ‘doDirectory’:
mkfontscale.c:928:17: warning: declaration of ‘n’ shadows a previous local [-Wshadow]
int n = strlen(xlfd_name);
^
mkfontscale.c:788:12: note: shadowed declaration is here
int i, n, dirn, diri, found, rc;
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | mkfontscale.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mkfontscale.c b/mkfontscale.c index 9e5c01c..e5169b3 100644 --- a/mkfontscale.c +++ b/mkfontscale.c @@ -925,14 +925,14 @@ doDirectory(const char *dirname_given, int numEncodings, ListPtr encodingsToDo) if(xlfd_name) { /* We know it's a bitmap font, and we know its XLFD */ - int n = strlen(xlfd_name); + int l = strlen(xlfd_name); if(reencodeLegacy && - n >= 12 && strcasecmp(xlfd_name + n - 11, "-iso10646-1") == 0) { + l >= 12 && strcasecmp(xlfd_name + l - 11, "-iso10646-1") == 0) { char *s; - s = malloc(n - 10); - memcpy(s, xlfd_name, n - 11); - s[n - 11] = '\0'; + s = malloc(l - 10); + memcpy(s, xlfd_name, l - 11); + s[l - 11] = '\0'; xlfd = listCons(s, xlfd); } else { /* Not a reencodable font -- skip all the rest of the loop body */ |