mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-28 04:00:06 +08:00
Fix unicode compiler warning again
This commit is contained in:
parent
19cc80788d
commit
53dd065daf
4
tccpp.c
4
tccpp.c
@ -349,10 +349,10 @@ ST_INLN char *unicode_to_utf8 (char *b, uint32_t Uc)
|
||||
{
|
||||
if (Uc<0x80) *b++=Uc;
|
||||
else if (Uc<0x800) *b++=192+Uc/64, *b++=128+Uc%64;
|
||||
else if (Uc-0xd800u<0x800) return b;
|
||||
else if (Uc-0xd800u<0x800) goto error;
|
||||
else if (Uc<0x10000) *b++=224+Uc/4096, *b++=128+Uc/64%64, *b++=128+Uc%64;
|
||||
else if (Uc<0x110000) *b++=240+Uc/262144, *b++=128+Uc/4096%64, *b++=128+Uc/64%64, *b++=128+Uc%64;
|
||||
else tcc_error("0x%x is not a valid universal character", Uc);
|
||||
else error: tcc_error("0x%x is not a valid universal character", Uc);
|
||||
return b;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user