Skip to content

Commit

Permalink
style: clear compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Sep 8, 2018
1 parent 70660de commit 067f9f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions include/LCUI/types.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*
* types.h -- The common macros and types definition for LCUI
/* types.h -- The common macros and types definition for LCUI
*
* Copyright (c) 2018, Liu chao <lc-soft@live.cn> All rights reserved.
*
Expand Down
4 changes: 3 additions & 1 deletion src/font/charset.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*/

#include <wchar.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand All @@ -49,6 +50,7 @@
#define UNICODE_UTF8_4 0x1fffff

#ifdef LCUI_BUILD_IN_WIN32
#include <Windows.h>
#define encode(CP, WSTR, STR, LEN) \
WideCharToMultiByte(CP, 0, WSTR, -1, STR, LEN, NULL, NULL)
#define decode(CP, STR, WSTR, LEN) \
Expand Down Expand Up @@ -103,7 +105,7 @@ static size_t utf8_to_ucs2(const char *utf8, wchar_t *ucs2)

/* https://github.com/benkasminbullock/unicode-c/blob/master/unicode.c#L310 */

size_t ucs2_to_utf8(wchar_t ucs2, unsigned char *utf8)
size_t ucs2_to_utf8(int32_t ucs2, unsigned char *utf8)
{
if (ucs2 < 0x80) {
utf8[0] = ucs2;
Expand Down

0 comments on commit 067f9f5

Please sign in to comment.