diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-08-10 20:19:09 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-08-10 20:19:09 -0700 |
commit | 735098e097ad62bdc4b1121c6c0c983eb7483485 (patch) | |
tree | a858fedc30e6149ed430784942413a2b06741ec9 /src/utf8.c | |
parent | a541e39f69cfa75422fbe70c59c2ac40fbdbe1d7 (diff) | |
parent | ce0e58469f7c4abf3f51bde6d3298215d6ef99d1 (diff) |
Merge pull request #76 from kainjow/msvc-warnings
Fix some MSVC warnings
Diffstat (limited to 'src/utf8.c')
-rwxr-xr-x | src/utf8.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -191,10 +191,10 @@ void cmark_utf8proc_encode_char(int32_t uc, cmark_strbuf *buf) { assert(uc >= 0); if (uc < 0x80) { - dst[0] = uc; + dst[0] = (uint8_t)(uc); len = 1; } else if (uc < 0x800) { - dst[0] = 0xC0 + (uc >> 6); + dst[0] = (uint8_t)(0xC0 + (uc >> 6)); dst[1] = 0x80 + (uc & 0x3F); len = 2; } else if (uc == 0xFFFF) { @@ -204,12 +204,12 @@ void cmark_utf8proc_encode_char(int32_t uc, cmark_strbuf *buf) { dst[0] = 0xFE; len = 1; } else if (uc < 0x10000) { - dst[0] = 0xE0 + (uc >> 12); + dst[0] = (uint8_t)(0xE0 + (uc >> 12)); dst[1] = 0x80 + ((uc >> 6) & 0x3F); dst[2] = 0x80 + (uc & 0x3F); len = 3; } else if (uc < 0x110000) { - dst[0] = 0xF0 + (uc >> 18); + dst[0] = (uint8_t)(0xF0 + (uc >> 18)); dst[1] = 0x80 + ((uc >> 12) & 0x3F); dst[2] = 0x80 + ((uc >> 6) & 0x3F); dst[3] = 0x80 + (uc & 0x3F); |