Received: by mail.netbsd.org (Postfix, from userid 605) id CA2F384D7E; Tue, 24 Mar 2020 05:49:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 5274D84D7C for ; Tue, 24 Mar 2020 05:49:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id Kd3y4QP30LeG for ; Tue, 24 Mar 2020 05:49:40 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id CFBB484D37 for ; Tue, 24 Mar 2020 05:49:40 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id C3488FB27; Tue, 24 Mar 2020 05:49:40 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_158502898035100" MIME-Version: 1.0 Date: Tue, 24 Mar 2020 05:49:40 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/textproc/p5-Encode-Detect To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20200324054940.C3488FB27@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_158502898035100 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Tue Mar 24 05:49:40 UTC 2020 Modified Files: pkgsrc/textproc/p5-Encode-Detect: Makefile Log Message: textproc/p5-Encode-Detect: fix 'array subscript has type char' errors In file included from src/JpCntx.cpp:39:0: src/JpCntx.h: In member function 'void JapaneseContextAnalysis::HandleOneChar(const char*, PRUint32)': src/JpCntx.h:72:55: error: array subscript has type 'char' [-Werror=char-subscripts] mRelSample[jp2CharContext[mLastCharOrder][order]]++; ^ src/JpCntx.cpp: In member function 'void JapaneseContextAnalysis::HandleData(const char*, PRUint32)': src/JpCntx.cpp:164:57: error: array subscript has type 'char' [-Werror=char-subscripts] mRelSample[jp2CharContext[mLastCharOrder][order]]++; ^ The mentioned char arrays only contain small nonnegative numbers, therefore their exact data type doesn't matter. It is now unsigned char. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 pkgsrc/textproc/p5-Encode-Detect/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_158502898035100 Content-Disposition: inline Content-Length: 1141 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/textproc/p5-Encode-Detect/Makefile diff -u pkgsrc/textproc/p5-Encode-Detect/Makefile:1.20 pkgsrc/textproc/p5-Encode-Detect/Makefile:1.21 --- pkgsrc/textproc/p5-Encode-Detect/Makefile:1.20 Sun Aug 11 13:23:28 2019 +++ pkgsrc/textproc/p5-Encode-Detect/Makefile Tue Mar 24 05:49:40 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2019/08/11 13:23:28 wiz Exp $ +# $NetBSD: Makefile,v 1.21 2020/03/24 05:49:40 rillig Exp $ # DISTNAME= Encode-Detect-1.01 @@ -19,5 +19,14 @@ USE_LANGUAGES+= c c++ PERL5_PACKLIST= auto/Encode/Detect/.packlist PERL5_MODULE_TYPE= Module::Build +SUBST_CLASSES+= char +SUBST_STAGE.char= pre-configure +SUBST_MESSAGE.char= Fixing 'char array subscript' errors. +SUBST_FILES.char= src/JpCntx.* src/nsSBCharSetProber.h src/Lang*Model.cpp +SUBST_SED.char= -e 's,^extern \(char jp2CharContext\),extern unsigned \1,' +SUBST_SED.char+= -e 's,^char jp2CharContext,unsigned &,' +SUBST_SED.char+= -e 's,^ char \*precedenceMatrix, unsigned &,' +SUBST_SED.char+= -e 's,^char [[:alnum:]]*LangModel,unsigned &,' + .include "../../lang/perl5/module.mk" .include "../../mk/bsd.pkg.mk" --_----------=_158502898035100--