mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 06:30:14 +08:00
ccstruct: Fix compiler warning (disable buggy code)
gcc reports a potential bad array access: ccstruct/mod128.cpp:98:20: warning: array subscript has type 'char' [-Wchar-subscripts] dir is of type 'char'. Most compilers use signed char by default. Then the value of dir is in the range -128 ... 127 and cannot be used to access an array with 256 elements. Don't fix that but disable the buggy code. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
997c4a6078
commit
70fd7cdf0a
@ -94,6 +94,8 @@ DIR128::DIR128( //from fcoord
|
||||
* Convert a direction to a vector.
|
||||
**********************************************************************/
|
||||
|
||||
#if 0 // code is buggy for negative dir and unused
|
||||
ICOORD DIR128::vector() const { //convert to vector
|
||||
return dirtab[dir]; //easy really
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user