pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/textproc/p5-Encode-Detect
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.
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"
Home |
Main Index |
Thread Index |
Old Index