From dea1a38e2390c40a71591a4c08c5c021b9693328 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 15 Jul 2018 10:13:31 +0000 Subject: mwrap_aref: quiet -Wshorten-64-to-32 warning An "int" length is enough for the source location length, as it's not going to exceed PATH_MAX by much. --- ext/mwrap/mwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/mwrap/mwrap.c') diff --git a/ext/mwrap/mwrap.c b/ext/mwrap/mwrap.c index 7455c54..2b946b1 100644 --- a/ext/mwrap/mwrap.c +++ b/ext/mwrap/mwrap.c @@ -826,7 +826,7 @@ static VALUE cSrcLoc; static VALUE mwrap_aref(VALUE mod, VALUE loc) { const char *str = StringValueCStr(loc); - long len = RSTRING_LEN(loc); + int len = RSTRING_LENINT(loc); struct src_loc *k = 0; uintptr_t p; struct cds_lfht_iter iter; -- cgit v1.2.3-24-ge0c7