From 6743cd2b41781df3252d6cd6e29e99f8d9ae13c8 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Wed, 22 Aug 2018 14:51:35 +0900 Subject: [PATCH] add cast in hash() for escape warning in Windows --- src/euc_jp_prop.c | 4 ++-- src/sjis_prop.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/euc_jp_prop.c b/src/euc_jp_prop.c index 8607bdc..3f84aef 100644 --- a/src/euc_jp_prop.c +++ b/src/euc_jp_prop.c @@ -1,5 +1,5 @@ /* ANSI-C code produced by gperf version 3.1 */ -/* Command-line: gperf -pt -T -L ANSI-C -N onigenc_euc_jp_lookup_property_name --output-file euc_jp_prop.c euc_jp_prop.gperf */ +/* Command-line: /usr/bin/gperf -pt -T -L ANSI-C -N onigenc_euc_jp_lookup_property_name --output-file gperf1.tmp euc_jp_prop.gperf */ /* Computed positions: -k'1,3' */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ @@ -80,7 +80,7 @@ hash (register const char *str, register size_t len) 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56 }; - return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]]; + return (unsigned int )len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]]; } struct PropertyNameCtype * diff --git a/src/sjis_prop.c b/src/sjis_prop.c index a84a9e6..0d0c68f 100644 --- a/src/sjis_prop.c +++ b/src/sjis_prop.c @@ -1,5 +1,5 @@ /* ANSI-C code produced by gperf version 3.1 */ -/* Command-line: gperf -pt -T -L ANSI-C -N onigenc_sjis_lookup_property_name --output-file sjis_prop.c sjis_prop.gperf */ +/* Command-line: /usr/bin/gperf -pt -T -L ANSI-C -N onigenc_sjis_lookup_property_name --output-file gperf2.tmp sjis_prop.gperf */ /* Computed positions: -k'1,3' */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ @@ -80,7 +80,7 @@ hash (register const char *str, register size_t len) 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56 }; - return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]]; + return (unsigned int )len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]]; } struct PropertyNameCtype * -- 2.40.0