From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id A7AEB208F8 for ; Mon, 16 Jul 2018 21:19:38 +0000 (UTC) From: Eric Wong To: mwrap-public@80x24.org Subject: [PATCH 13/19] mwrap_aref: quiet -Wshorten-64-to-32 warning Date: Mon, 16 Jul 2018 21:19:27 +0000 Message-Id: <20180716211933.5835-14-e@80x24.org> In-Reply-To: <20180716211933.5835-1-e@80x24.org> References: <20180716211933.5835-1-e@80x24.org> List-Id: 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(-) 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; -- EW