…n this code." * commit '540e7ee8dbf1d7ee72ef45c92efbebcb89bf6d1a': Build on host as 32-bit as there are 64-bit bugs in this code.
Enabled -Werror on a 64-bit host build (BUILD_HOST_64bit=1), ignored unused parameter warnings and then cleaned up what remained. The most concerning issue was always true comparisons caused by comparing an unsigned int with a size_t. Migrate C++ code to use C++11.
Changes include [x] Addition of a new function lstrtosize_t Since size_t is not the same size as an unsigned int in AArch64, a new function lstrtosize_t has been devised for use in the shared/src/SessionTypeImpl.c and srec/Recognizer/src/RecognizerImpl.c modules in place of the lstrtoui function (which is for unsigned integers). lstrtosize_t is implemented in the portable/src/LCHAR.c module and declared in portable/include/LCHAR.h header file. It makes use of the LSTRTOULL macro defined in the portable/include/ptypes.h header file, indicating the function to be used to convert an unsigned long long to a string. [x] Changes in srec/cfront/sh_down.h header file This is because the value of LONG_MAX is different on __LP64__ with 64-bit longs, and the function converts to an int, not to a long. [x] Changes to the srec/test/SRecTest/src/SRecTest.c and srec/test/SRecTestAudio/src/SRecTestAudio.c modules These changes correct the parameter types for the call to SR_RecognizerPutAudio and pfread to be the expected size_t, again because size_t is not the same as unsigned int in __LP64__. [x] Rest of the changes are related to general conversion from 32-bit to 64-bit including proper casts of pointers, changes from int to long, jint to jlong. Change-Id: I3cc7d3a89161ab098a4bd133ea96b1158630b0e1 Signed-off-by: Marcus Oakland <firstname.lastname@example.org> Signed-off-by: Serban Constantinescu <email@example.com> Signed-off-by: Ashok Bhat <firstname.lastname@example.org>