Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
exclude this file from scan-build and sonar analysis, as the uninitialized value...
authorAugustin Degomme <adegomme@users.noreply.github.com>
Tue, 10 Aug 2021 10:45:28 +0000 (12:45 +0200)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Tue, 10 Aug 2021 10:50:23 +0000 (12:50 +0200)
sonar-project.properties
teshsuite/smpi/replay-ti-colls/replay-ti-colls.c

index b87ed17..86aea6c 100644 (file)
@@ -168,6 +168,10 @@ sonar.issue.ignore.multicriteria.s4.resourceKey=src/smpi/**/*.cpp
 sonar.issue.ignore.multicriteria.s5.ruleKey=cpp:S995
 sonar.issue.ignore.multicriteria.s5.resourceKey=src/smpi/bindings/*.cpp
 
+#There is an intentional uninitialized variable in this test, to check SMPI does not use irrelevant values for some ranks
+sonar.issue.ignore.multicriteria.s6.ruleKey=c:S836
+sonar.issue.ignore.multicriteria.s6.resourceKey=teshsuite/smpi/replay-ti-colls/replay-ti-colls.c
+
 # Exclude some files from the analysis:
 #  - our unit tests
 #  - the tests that we borrowed elsewhere (MPICH and ISP)
index aac4610..2f4955a 100644 (file)
@@ -1,3 +1,6 @@
+//exclude from clang static analysis, as there is an intentional uninitialized value passed to MPI calls.
+#ifndef __clang_analyzer__
+
 #include <stdio.h>
 #include <string.h>
 #include "mpi.h"
@@ -97,3 +100,5 @@ main (int argc, char **argv){
   MPI_Finalize ();
   return 0;
 }
+
+#endif
\ No newline at end of file