diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-03-06 16:23:46 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-03-06 16:23:46 (GMT) |
commit | 994bb76916ba7725eb822cf9c3c63ec53c6a0381 (patch) | |
tree | fec38e22f1aad557ebf17e96854563c8ded5471d /Utilities | |
parent | 55f5007a6d40b7ec8b82b4920c281dc45638e6c3 (diff) | |
download | CMake-994bb76916ba7725eb822cf9c3c63ec53c6a0381.zip CMake-994bb76916ba7725eb822cf9c3c63ec53c6a0381.tar.gz CMake-994bb76916ba7725eb822cf9c3c63ec53c6a0381.tar.bz2 |
COMP: Remove warning on gcc
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmxmlrpc/xmlrpc_utf8.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Utilities/cmxmlrpc/xmlrpc_utf8.c b/Utilities/cmxmlrpc/xmlrpc_utf8.c index 353c72e..22223ef 100644 --- a/Utilities/cmxmlrpc/xmlrpc_utf8.c +++ b/Utilities/cmxmlrpc/xmlrpc_utf8.c @@ -319,6 +319,7 @@ xmlrpc_mem_block *xmlrpc_wcs_to_utf8 (xmlrpc_env *env, xmlrpc_mem_block *output; unsigned char *buffer; wchar_t wc; + int cwc; XMLRPC_ASSERT_ENV_OK(env); XMLRPC_ASSERT_PTR_OK(wcs_data); @@ -334,13 +335,14 @@ xmlrpc_mem_block *xmlrpc_wcs_to_utf8 (xmlrpc_env *env, bytes_used = 0; for (i = 0; i < wcs_len; i++) { wc = wcs_data[i]; - if (wc <= 0x007F) { + cwc = wc; + if (cwc <= 0x007F) { buffer[bytes_used++] = wc & 0x7F; - } else if (wc <= 0x07FF) { + } else if (cwc <= 0x07FF) { /* 110xxxxx 10xxxxxx */ buffer[bytes_used++] = 0xC0 | (wc >> 6); buffer[bytes_used++] = 0x80 | (wc & 0x3F); - } else if (wc <= 0xFFFF) { + } else if (cwc <= 0xFFFF) { /* 1110xxxx 10xxxxxx 10xxxxxx */ buffer[bytes_used++] = 0xE0 | (wc >> 12); buffer[bytes_used++] = 0x80 | ((wc >> 6) & 0x3F); |