This fixes compiler warnings from clang:
src/training/validator.h:72:7: warning:
'Validator' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit [-Wweak-vtables]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes compiler warnings from clang:
src/dict/dawg.h:119:7: warning:
'Dawg' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit [-Wweak-vtables]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes compiler warnings from clang:
src/cutil/cutil_class.h:27:7: warning:
'CUtil' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit [-Wweak-vtables]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes compiler warnings from clang:
src/ccutil/indexmapbidi.h:102:7: warning:
'IndexMapBiDi' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit [-Wweak-vtables]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes compiler warnings from clang:
src/ccutil/ccutil.h:51:7: warning:
'CCUtil' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit [-Wweak-vtables]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes compiler warnings from clang:
src/ccstruct/matrix.h:575:7: warning:
'MATRIX' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit [-Wweak-vtables]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes compiler warnings from clang:
src/ccstruct/ccstruct.h:25:7: warning:
'CCStruct' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit [-Wweak-vtables]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes compiler warnings from clang:
src/viewer/scrollview.h:86:7: warning:
'SVEventHandler' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit [-Wweak-vtables]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes compiler warnings from clang:
src/ccmain/mutableiterator.h:44:7: warning:
'MutableIterator' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit [-Wweak-vtables]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes compiler warnings from clang:
src/ccmain/ltrresultiterator.h:48:16: warning:
'LTRResultIterator' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit [-Wweak-vtables]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Either it was not needed, or it could be replaced by checking
for not _WIN32.
This fixes a compiler warning from clang:
src/ccutil/platform.h:41:9: warning:
macro name is a reserved identifier [-Wreserved-id-macro]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Compiler warning from clang:
src/api/pdfrenderer.cpp:848:28: warning:
cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
size_t would require a different format string. Here an unsigned int
is sufficient in both cases, so use that.
This error was found by lgtm, see
https://lgtm.com/projects/g/tesseract-ocr/tesseract/.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Compiler warnings from clang:
src/textord/makerow.cpp:2579:36: warning:
cast from 'const void *' to 'BLOBNBOX **' drops const qualifier [-Wcast-qual]
src/textord/makerow.cpp:2581:36: warning:
cast from 'const void *' to 'BLOBNBOX **' drops const qualifier [-Wcast-qual]
src/textord/makerow.cpp:2601:31: warning:
cast from 'const void *' to 'TO_ROW **' drops const qualifier [-Wcast-qual]
src/textord/makerow.cpp:2603:31: warning:
cast from 'const void *' to 'TO_ROW **' drops const qualifier [-Wcast-qual]
src/textord/makerow.cpp:2623:31: warning:
cast from 'const void *' to 'TO_ROW **' drops const qualifier [-Wcast-qual]
src/textord/makerow.cpp:2625:31: warning:
cast from 'const void *' to 'TO_ROW **' drops const qualifier [-Wcast-qual]
Warning from lgtm:
Local variable 'blob' hides a parameter of the same name.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Compiler warnings from clang:
src/ccstruct/werd.cpp:128:4: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/werd.cpp:394:18: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/werd.cpp:394:27: warning:
cast from 'const void *' to 'WERD **' drops const qualifier [-Wcast-qual]
src/ccstruct/werd.cpp:395:18: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/werd.cpp:395:27: warning:
cast from 'const void *' to 'WERD **' drops const qualifier [-Wcast-qual]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Compiler warnings from clang:
src/ccstruct/polyblk.cpp:194:16: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/polyblk.cpp:195:16: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/polyblk.cpp:292:45: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/polyblk.cpp:30:9: warning:
macro is not used [-Wunused-macros]
src/ccstruct/polyblk.cpp:348:8: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/polyblk.cpp:358:12: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/polyblk.cpp:362:26: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/polyblk.cpp:383:21: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/polyblk.cpp:383:36: warning:
cast from 'const void *' to 'ICOORDELT **' drops const qualifier [-Wcast-qual]
src/ccstruct/polyblk.cpp:384:21: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/polyblk.cpp:384:36:
warning: cast from 'const void *' to 'ICOORDELT **' drops const qualifier [-Wcast-qual]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Compiler warnings from clang:
src/ccstruct/ocrblock.cpp:74:12: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/ocrblock.cpp:74:21: warning:
cast from 'const void *' to 'ROW **' drops const qualifier [-Wcast-qual]
src/ccstruct/ocrblock.cpp:75:16: warning:
cast from 'const void *' to 'ROW **' drops const qualifier [-Wcast-qual]
src/ccstruct/ocrblock.cpp:75:7: warning:
use of old-style cast [-Wold-style-cast]
Make also the function decreasing_top_order a local function as it is
only used locally and remove its global declarations (2 locations).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Compiler warnings from clang:
src/ccstruct/mod128.cpp:57:15: warning:
no previous extern declaration for non-static variable 'dirtab' [-Wmissing-variable-declarations]
src/ccstruct/mod128.cpp:57:24: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/mod128.cpp:57:35: warning:
cast from 'const short *' to 'ICOORD *' drops const qualifier [-Wcast-qual]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Snapcraft will soonly drop the feature to automatic staging the
depending libraries into the snap, specify it manually to avoid breakage
in the future.
This deals with the following warning message in the build:
```
Priming leptonica
Files from the build host were migrated into the snap to satisfy
dependencies that would otherwise not be met. This feature will be
removed in a future release. If these libraries are needed in the final
snap, ensure that the following are either satisfied by a stage-packages
entry or through a part:
usr/lib/x86_64-linux-gnu/libjbig.so.0
usr/lib/x86_64-linux-gnu/libjpeg.so.8
usr/lib/x86_64-linux-gnu/libopenjp2.so.7
usr/lib/x86_64-linux-gnu/libtiff.so.5
Priming tesseract
Files from the build host were migrated into the snap to satisfy
dependencies that would otherwise not be met. This feature will be
removed in a future release. If these libraries are needed in the final
snap, ensure that the following are either satisfied by a stage-packages
entry or through a part:
usr/lib/x86_64-linux-gnu/libgomp.so.1
```
Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
Compiler warnings from clang:
src/ccstruct/genblob.cpp:34:20: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/genblob.cpp:34:32: warning:
cast from 'const void *' to 'C_BLOB **' drops const qualifier [-Wcast-qual]
src/ccstruct/genblob.cpp:35:20: warning:
use of old-style cast [-Wold-style-cast]
src/ccstruct/genblob.cpp:35:32: warning:
cast from 'const void *' to 'C_BLOB **' drops const qualifier [-Wcast-qual]
The function c_blob_comparator is only used in fixspace.cpp,
so move it to that file, make it a local function, and remove
genblob.cpp and genblob.h which are no longer needed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This allows access to the files under `/media/*` and `/run/media/*`, as
the connection is not automatic connect instructions is also added to
the snap's description.
Refer-to: Interfaces - doc - snapcraft.io
<https://forum.snapcraft.io/t/interfaces/6154>
Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
This change allows downstream packagers to publish the snap to the
candidate and stable channels.
Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
Snapcraft supports automatic `git describe` based versioning when the
`version` key is set to `git`. This gives more information of the
source status of a snap distribution.
Refer-to: Snapcraft.yaml reference - doc - snapcraft.io
<https://forum.snapcraft.io/t/snapcraft-yaml-reference/4276>
Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
It is only used in textord/topitch.cpp, so move it into that file.
Remove also the inline attribute as it has not effect here and
update the type casts to fix some compiler warnings from clang.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
It needs an update of the test submodule.
The tests only pass with a small modification of the ground truth texts
(kTruthTextWords, kTruthTextLine).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
It only works if training is enabled and built.
The test "PrintUsageAndExit" had to be disabled because it
currently fails.
Signed-off-by: Stefan Weil <sw@weilnetz.de>