Coverity bug reports:
CID 1270405: Uninitialized scalar variable
CID 1270408: Uninitialized scalar variable
CID 1270409: Uninitialized scalar variable
CID 1270410: Uninitialized scalar variable
Those variables are set conditionally in the while loop
and must keep their values in following iterations, so
they must be declared outside of the loop.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Coverity bug report: CID 1270401 (#1 of 1): Use after free
As the comment (which was also fixed) says, ReadNextBox() already
calls fclose(box_file), so don't call it a 2nd time.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This command fails currently:
wget http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.sh
Obviously cmake.org now redirects to https connections, so we have to
fix the URL. Then there still remains a certificate problem. Adding
--no-check-certificate is a workaround which should be removed later.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes clang compiler warnings like this one:
wordrec/gradechop.cpp:52:3: warning:
'register' storage class specifier is deprecated [-Wdeprecated-register]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
gcc reports these warnings with -Wextra:
ccstruct/pageres.h:330:3: warning:
base class 'class ELIST_LINK' should be explicitly initialized
in the copy constructor [-Wextra]
ccstruct/ratngs.cpp:115:1: warning:
base class 'class ELIST_LINK' should be explicitly initialized
in the copy constructor [-Wextra]
ccstruct/ratngs.h:291:3: warning:
base class 'class ELIST_LINK' should be explicitly initialized
in the copy constructor [-Wextra]
ccutil/genericvector.h:435:3: warning:
base class 'class GenericVector<WERD_RES*>' should be explicitly initialized
in the copy constructor [-Wextra]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
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>
size_t is not always the same as long, especially not for 64 bit Windows:
api/pdfrenderer.cpp:549:31: warning:
format '%ld' expects argument of type 'long int',
but argument 4 has type 'size_t {aka long long unsigned int}' [-Wformat=]
size_t normally requires a format string "%zu", but this is unsupported
by Visual Studio, so use a type cast.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Windows.h works on Windows, but not for cross builds on Linux hosts
with case sensitive file systems which only provide windows.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes compiler warnings like this one:
api/baseapi.h:739:32: warning:
type qualifiers ignored on function return type [-Wignored-qualifiers]
Signed-off-by: Stefan Weil <sw@weilnetz.de>