x509asn1.c: Fixed compilation warnings

warning: declaration of 'chsize' shadows a global declaration
This commit is contained in:
Steve Holme 2013-11-03 16:24:17 +00:00
Родитель 0177f28c51
Коммит 297644fa70
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -252,7 +252,7 @@ utf8asn1str(char * * to, int type, const char * from, const char * end)
size_t inlength = end - from; size_t inlength = end - from;
int size = 1; int size = 1;
size_t outlength; size_t outlength;
int chsize; int charsize;
unsigned int wc; unsigned int wc;
char * buf; char * buf;
@ -305,7 +305,7 @@ utf8asn1str(char * * to, int type, const char * from, const char * end)
default: /* case 1: */ default: /* case 1: */
wc = (wc << 8) | *(const unsigned char *) from++; wc = (wc << 8) | *(const unsigned char *) from++;
} }
chsize = 1; charsize = 1;
if(wc >= 0x00000080) { if(wc >= 0x00000080) {
if(wc >= 0x00000800) { if(wc >= 0x00000800) {
if(wc >= 0x00010000) { if(wc >= 0x00010000) {
@ -315,18 +315,18 @@ utf8asn1str(char * * to, int type, const char * from, const char * end)
} }
buf[outlength + 3] = (char) (0x80 | (wc & 0x3F)); buf[outlength + 3] = (char) (0x80 | (wc & 0x3F));
wc = (wc >> 6) | 0x00010000; wc = (wc >> 6) | 0x00010000;
chsize++; charsize++;
} }
buf[outlength + 2] = (char) (0x80 | (wc & 0x3F)); buf[outlength + 2] = (char) (0x80 | (wc & 0x3F));
wc = (wc >> 6) | 0x00000800; wc = (wc >> 6) | 0x00000800;
chsize++; charsize++;
} }
buf[outlength + 1] = (char) (0x80 | (wc & 0x3F)); buf[outlength + 1] = (char) (0x80 | (wc & 0x3F));
wc = (wc >> 6) | 0x000000C0; wc = (wc >> 6) | 0x000000C0;
chsize++; charsize++;
} }
buf[outlength] = (char) wc; buf[outlength] = (char) wc;
outlength += chsize; outlength += charsize;
} }
} }
buf[outlength] = '\0'; buf[outlength] = '\0';