diff options
author | Choe Hwanjin <choe.hwanjin@gmail.com> | 2021-04-04 11:24:51 +0900 |
---|---|---|
committer | Choe Hwanjin <choe.hwanjin@gmail.com> | 2021-04-04 11:24:51 +0900 |
commit | e075bff1fe6a36953125b9468b7d12fc97f7e1b0 (patch) | |
tree | 012d444d4912bd842f4da6d22b8760892373e052 /hangul | |
parent | 2ddc547f014afdc25b73a2f26f28b70728d79105 (diff) | |
download | libhangul-e075bff1fe6a36953125b9468b7d12fc97f7e1b0.tar.gz |
Remove compiler warnings with -Wpedantic (#44)pedantic-warning
pedantic 옵션을 추가했을 때 발생하는 워닝을 제거한다.
다른 워닝이 발생하는 곳도 같이 수정한다.
https://github.com/libhangul/libhangul/issues/44
Diffstat (limited to 'hangul')
-rw-r--r-- | hangul/hangul.h | 2 | ||||
-rw-r--r-- | hangul/hangulinputcontext.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/hangul/hangul.h b/hangul/hangul.h index dcafcd4..36156db 100644 --- a/hangul/hangul.h +++ b/hangul/hangul.h @@ -23,7 +23,7 @@ #include <inttypes.h> #ifdef __GNUC__ -#define LIBHANGUL_DEPRECATED __attribute__((deprecated)); +#define LIBHANGUL_DEPRECATED __attribute__((deprecated)) #else #define LIBHANGUL_DEPRECATED #endif diff --git a/hangul/hangulinputcontext.c b/hangul/hangulinputcontext.c index d8d93f6..cd54945 100644 --- a/hangul/hangulinputcontext.c +++ b/hangul/hangulinputcontext.c @@ -1411,10 +1411,10 @@ void hangul_ic_connect_callback(HangulInputContext* hic, const char* event, return; if (strcasecmp(event, "translate") == 0) { - hic->on_translate = (HangulOnTranslate)callback; + *(void**)(&hic->on_translate) = callback; hic->on_translate_data = user_data; } else if (strcasecmp(event, "transition") == 0) { - hic->on_transition = (HangulOnTransition)callback; + *(void**)(&hic->on_transition) = callback; hic->on_transition_data = user_data; } } |