From bcb241b054da662d3b13c9d16455ed2d93cdbe86 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Sat, 3 Feb 2018 19:15:52 +0900 Subject: [PATCH] escape compile-time warnings for MacOS X --- test/Makefile.am | 5 +++-- test/testu.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index 9643bb0..6559a77 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -2,7 +2,7 @@ lib_onig = ../src/libonig.la AM_LDFLAGS = -L$(prefix)/lib -AM_CFLAGS = +AM_CFLAGS = -Wall -Wno-invalid-source-encoding AM_CPPFLAGS = -I$(top_srcdir)/src -I$(includedir) TESTS = test_utf8 testc testp testcu @@ -27,7 +27,8 @@ testc_LDADD = $(lib_onig) testp_SOURCES = testc.c testp_LDADD = $(lib_onig) -testp_CFLAGS = -DPOSIX_TEST +testp_CFLAGS = -DPOSIX_TEST -Wall -Wno-invalid-source-encoding + testcu_SOURCES = testu.c testcu_LDADD = $(lib_onig) diff --git a/test/testu.c b/test/testu.c index d037194..d2bb9ee 100644 --- a/test/testu.c +++ b/test/testu.c @@ -139,7 +139,7 @@ static void xx(char* pattern, char* str, int from, int to, int mem, int not) if (r) { 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(err_file, "ERROR: %s\n", s); nerror++; return ; @@ -150,7 +150,7 @@ static void xx(char* pattern, char* str, int from, int to, int mem, int not) region, ONIG_OPTION_NONE); if (r < ONIG_MISMATCH) { char s[ONIG_MAX_ERROR_MESSAGE_LEN]; - onig_error_code_to_str(s, r); + onig_error_code_to_str((UChar* )s, r); fprintf(err_file, "ERROR: %s\n", s); nerror++; return ; -- 2.40.0