diff OrthancStone/Resources/RunCppCheck.sh @ 1571:85e117739eca

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 Sep 2020 17:46:39 +0200
parents
children 32e0c007789d
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancStone/Resources/RunCppCheck.sh	Mon Sep 21 17:46:39 2020 +0200
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+set -ex
+
+CPPCHECK=cppcheck
+
+if [ $# -ge 1 ]; then
+    CPPCHECK=$1
+fi
+
+cat <<EOF > /tmp/cppcheck-suppressions.txt
+unpreciseMathCall:../../OrthancStone/Sources/Scene2D/Internals/CairoFloatTextureRenderer.cpp
+unpreciseMathCall:../../OrthancStone/Sources/Scene2D/LookupTableTextureSceneLayer.cpp
+unusedFunction
+useInitializationList:../../OrthancStone/Sources/OpenGL/OpenGLProgram.cpp:36
+unreadVariable:../../OrthancStone/Sources/Viewport/SdlViewport.cpp:135
+unreadVariable:../../OrthancStone/Sources/Viewport/SdlViewport.cpp:193
+EOF
+
+${CPPCHECK} --enable=all --quiet --std=c++11 \
+            --suppressions-list=/tmp/cppcheck-suppressions.txt \
+            -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=1 \
+            -DORTHANC_ENABLE_BASE64=1 \
+            -DORTHANC_ENABLE_CIVETWEB=0 \
+            -DORTHANC_ENABLE_CURL=1 \
+            -DORTHANC_ENABLE_DCMTK=1 \
+            -DORTHANC_ENABLE_DCMTK_JPEG=1 \
+            -DORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS=1 \
+            -DORTHANC_ENABLE_GLEW=1 \
+            -DORTHANC_ENABLE_JPEG=1 \
+            -DORTHANC_ENABLE_LOCALE=1 \
+            -DORTHANC_ENABLE_LOGGING=1 \
+            -DORTHANC_ENABLE_LOGGING_STDIO=1 \
+            -DORTHANC_ENABLE_MD5=1 \
+            -DORTHANC_ENABLE_MONGOOSE=0 \
+            -DORTHANC_ENABLE_OPENGL=1 \
+            -DORTHANC_ENABLE_PKCS11=0 \
+            -DORTHANC_ENABLE_PNG=1 \
+            -DORTHANC_ENABLE_PUGIXML=0 \
+            -DORTHANC_ENABLE_SDL=1 \
+            -DORTHANC_ENABLE_SSL=1 \
+            -DORTHANC_ENABLE_THREADS=1 \
+            -DORTHANC_ENABLE_WASM=1 \
+            -DORTHANC_ENABLE_ZLIB=1 \
+            -DORTHANC_SANDBOXED=0 \
+            -D__GNUC__ \
+            -D__cplusplus=201103 \
+            -D__linux__ \
+            -UNDEBUG \
+            -I/home/jodogne/Subversion/orthanc/OrthancFramework/Sources \
+            \
+            ../../OrthancStone/Sources \
+            \
+            2>&1