Subject: | array subscript has type 'char' |
Date: | Tue, 24 Mar 2020 06:28:39 +0100 |
To: | bug-Encode-Detect [...] rt.cpan.org |
From: | Roland Illig <roland.illig [...] gmx.de> |
When compiling Encode::Detect, I get:
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 jp2CharContext table should use unsigned char instead of char as its
type.