Both functions simply call malloc, free.
Remove also unneeded null pointer checks and use calloc where possible.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Fix this warning from doxygen:
warning: doxygen no longer ships with the FreeSans font.
You may want to clear or change DOT_FONTNAME.
Otherwise you run the risk that the wrong font is being used for dot generated graphs.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
A Tesseract binary with OpenCL support can also run on a host without
any OpenCL platform, as it simply uses the normal CPU based code.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Since commit 245eebdf29, Tesseract 3.05
requires Leptonica 1.74, so this is not a new requirement for 4.00.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Implement and contribute one small typographical fix, thereby improving the readability of the script's check
for the existence of the `m4` top-level directory.
Fix these kinds of warnings:
SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
SC2086: Double quote to prevent globbing and word splitting.
SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The OpenCL code of Tesseract uses TIFF functions, but the TIFF library
was not added to the linker flags for macOS.
This fixes builds with OpenCL on Mac.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
opencl_device_selection.h contains lots of code which is only used in
openclwrapper.cpp. This results in several compiler warnings:
opencl/opencl_device_selection.h:396:18: warning:
‘ds_status readProfileFromFile(ds_profile*, ds_score_deserializer, const char*)’ defined but not used [-Wunused-function]
opencl/opencl_device_selection.h:257:18: warning:
‘ds_status writeProfileToFile(ds_profile*, ds_score_serializer, const char*)’ defined but not used [-Wunused-function]
opencl/opencl_device_selection.h:196:18: warning:
‘ds_status profileDevices(ds_profile*, ds_evaluation_type, ds_perf_evaluator, void*, unsigned int*)’ defined but not used [-Wunused-function]
opencl/opencl_device_selection.h:90:18: warning:
‘ds_status initDSProfile(ds_profile**, const char*)’ defined but not used [-Wunused-function]
opencl/opencl_device_selection.h:70:18: warning:
‘ds_status releaseDSProfile(ds_profile*, ds_score_release)’ defined but not used [-Wunused-function]
Move that functions and all related code to openclwrapper.cpp.
Signed-off-by: Stefan Weil <sw@weilnetz.de>