Should the clang-analyze script should continue to rebuild with clang after reporting warnings for a library using clang analyze?
I've attached my console log for a build which uses opencv, the build exits after opencv fails to build.
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Source/modules/core/src/matrix.cpp:3650:13: warning: Access to field 'dims' results in a dereference of a null pointer (loaded from variable 'm')
create( m->dims, &m->size[0], m->type );
^~~~~~~
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Source/modules/core/src/matrix.cpp:3741:19: warning: Access to field 'dims' results in a dereference of a null pointer (loaded from field 'hdr')
m.create( hdr->dims, hdr->size, rtype );
^~~~~~~~~
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Source/modules/core/src/matrix.cpp:3833:24: warning: Called C++ object pointer is null
size_t hidx = h & (hdr->hashtab.size() - 1), nidx = hdr->hashtab[hidx];
^~~~~~~~~~~~~~~~~~~
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Source/modules/core/src/matrix.cpp:3855:24: warning: Called C++ object pointer is null
[hunter ** FATAL ERROR **] Build step failed (dir: /home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV
[hunter ** FATAL ERROR **] [Directory:/home/oliver.daniell/jenkins/workspace/.hunter/_Base/Download/Hunter/0.11.18-seebyte/036f433/Unpacked/cmake/projects/OpenCV]
------------------------------ WIKI -------------------------------
https://github.com/ruslo/hunter/wiki/error.external.build.failed
-------------------------------------------------------------------
CMake Error at /home/oliver.daniell/jenkins/workspace/.hunter/_Base/Download/Hunter/0.11.18-seebyte/036f433/Unpacked/cmake/modules/hunter_wiki.cmake:12 (message):
Call Stack (most recent call first):
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/Download/Hunter/0.11.18-seebyte/036f433/Unpacked/cmake/modules/hunter_fatal_error.cmake:20 (hunter_wiki)
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/Download/Hunter/0.11.18-seebyte/036f433/Unpacked/cmake/modules/hunter_download.cmake:384 (hunter_fatal_error)
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/Download/Hunter/0.11.18-seebyte/036f433/Unpacked/cmake/projects/OpenCV/hunter.cmake:165 (hunter_download)
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/Download/Hunter/0.11.18-seebyte/036f433/Unpacked/cmake/modules/hunter_add_package.cmake:87 (include)
modules/CMakeLists.txt:3 (hunter_add_package)
size_t hidx = h & (hdr->hashtab.size() - 1), nidx = hdr->hashtab[hidx];
^~~~~~~~~~~~~~~~~~~
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Source/modules/core/src/matrix.cpp:3877:24: warning: Called C++ object pointer is null
size_t hidx = h & (hdr->hashtab.size() - 1), nidx = hdr->hashtab[hidx];
^~~~~~~~~~~~~~~~~~~
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Source/modules/core/src/matrix.cpp:3899:16: warning: Access to field 'dims' results in a dereference of a null pointer (loaded from field 'hdr')
int i, d = hdr->dims;
^~~~~~~~~
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Source/modules/core/src/matrix.cpp:3924:24: warning: Called C++ object pointer is null
size_t hidx = h & (hdr->hashtab.size() - 1), nidx = hdr->hashtab[hidx], previdx=0;
^~~~~~~~~~~~~~~~~~~
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Source/modules/core/src/matrix.cpp:3943:24: warning: Called C++ object pointer is null
size_t hidx = h & (hdr->hashtab.size() - 1), nidx = hdr->hashtab[hidx], previdx=0;
^~~~~~~~~~~~~~~~~~~
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Source/modules/core/src/matrix.cpp:3962:16: warning: Access to field 'dims' results in a dereference of a null pointer (loaded from field 'hdr')
int i, d = hdr->dims;
^~~~~~~~~
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Source/modules/core/src/matrix.cpp:4017:20: warning: Called C++ object pointer is null
size_t hsize = hdr->hashtab.size();
^~~~~~~~~~~~~~~~~~~
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Source/modules/core/src/matrix.cpp:4228:26: warning: Array access (from variable 'minidx') results in a null pointer dereference
_minidx[i] = minidx[i];
^~~~~~~~~
/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Source/modules/core/src/matrix.cpp:4231:26: warning: Array access (from variable 'maxidx') results in a null pointer dereference
_maxidx[i] = maxidx[i];
^~~~~~~~~
31 warnings generated.
+ rm -f /tmp/polly-clang-analyze.out.3VF2M
+ rm -f /tmp/polly-clang-analyze.bin.83JNc
+ '[' 1 == 1 ']'
+ exit 1
make[5]: Leaving directory `/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Build/OpenCV-Release-prefix/src/OpenCV-Release-build'
make[4]: Leaving directory `/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Build/OpenCV-Release-prefix/src/OpenCV-Release-build'
make[5]: *** [modules/core/CMakeFiles/opencv_core.dir/src/matrix.cpp.o] Error 1
make[4]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make[3]: Leaving directory `/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Build/OpenCV-Release-prefix/src/OpenCV-Release-build'
make[3]: *** [all] Error 2
make[2]: Leaving directory `/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Build'
make[1]: Leaving directory `/home/oliver.daniell/jenkins/workspace/.hunter/_Base/036f433/9b60785/8934262/Build/OpenCV/Build'
make[2]: *** [OpenCV-Release-prefix/src/OpenCV-Release-stamp/OpenCV-Release-install] Error 2
make[1]: *** [CMakeFiles/OpenCV-Release.dir/all] Error 2
make: *** [all] Error 2
-- Configuring incomplete, errors occurred!
See also "/home/oliver.daniell/jenkins/workspace/MSHDF/b0491c07/_builds/analyze-Debug/CMakeFiles/CMakeOutput.log".
Command exit with status "1": [/home/oliver.daniell/jenkins/workspace/MSHDF/b0491c07]> "cmake" "-H." "-B/home/oliver.daniell/jenkins/workspace/MSHDF/b0491c07/_builds/analyze-Debug" "-DCMAKE_BUILD_TYPE=Debug" "-GUnix Makefiles" "-DCMAKE_TOOLCHAIN_FILE=/home/oliver.daniell/jenkins/workspace/MSHDF/b0491c07/polly/analyze.cmake" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DPOLLY_STATUS_DEBUG=ON" "-DHUNTER_STATUS_DEBUG=ON"
Log: /home/oliver.daniell/jenkins/workspace/MSHDF/b0491c07/_builds/analyze-Debug/_3rdParty/polly/log.txt
*** FAILED ***
Run script: /home/oliver.daniell/jenkins/workspace/MSHDF/b0491c07/polly/bin/build.py
Toolchain: analyze
Config: Debug
Command '['/usr/bin/python3', '/home/oliver.daniell/jenkins/workspace/MSHDF/b0491c07/polly/bin/build.py', '--toolchain', 'analyze', '--config', 'Debug', '--verbose', '--clear', '--test']' returned non-zero exit status 1
None
Build step 'Conditional step (single)' marked build as failure
Finished: FAILURE```