From 35608143b6646cd69a112330df87e7ab85fcad1b Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Sat, 3 Feb 2018 15:10:23 +0900 Subject: [PATCH] add type cast --- sample/callout.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sample/callout.c b/sample/callout.c index 53355d6..aabd259 100644 --- a/sample/callout.c +++ b/sample/callout.c @@ -17,7 +17,7 @@ callout_func(OnigCalloutArgs* args, void* user_data) UChar* content; len = args->content_end - args->content; - content = strndup(args->content, len); + content = (UChar* )strndup((const char* )args->content, len); fprintf(stdout, "CALLOUT: content: \"%s\", start: \"%s\", current: \"%s\"\n", content, args->start, args->current); @@ -54,7 +54,7 @@ test(char* in_pattern, char* in_str) ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo); if (r != ONIG_NORMAL) { char s[ONIG_MAX_ERROR_MESSAGE_LEN]; - onig_error_code_to_str(s, r, &einfo); + onig_error_code_to_str((UChar* )s, r, &einfo); fprintf(stderr, "COMPILE ERROR: %d: %s\n", r, s); return -1; } @@ -82,7 +82,7 @@ test(char* in_pattern, char* in_str) } else { /* error */ char s[ONIG_MAX_ERROR_MESSAGE_LEN]; - onig_error_code_to_str(s, r); + onig_error_code_to_str((UChar* )s, r); fprintf(stderr, "SEARCH ERROR: %d: %s\n", r, s); } -- 2.40.0