From 722bc5df7e7bde6ec865b991e500aca04c931ad5 Mon Sep 17 00:00:00 2001 From: Kevin Wojniak Date: Mon, 10 Aug 2015 10:06:14 -0700 Subject: Remove need to disable MSVC warning 4244 --- src/utf8.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/utf8.c') diff --git a/src/utf8.c b/src/utf8.c index a742a75..319539d 100755 --- a/src/utf8.c +++ b/src/utf8.c @@ -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); -- cgit v1.2.3