Fix for strict cppcheck and g++ warnings/errors