From: Augustin Degomme Date: Tue, 10 Aug 2021 10:45:28 +0000 (+0200) Subject: exclude this file from scan-build and sonar analysis, as the uninitialized value... X-Git-Tag: v3.29~141 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/dbf5a46e507e90f9cb5176dd07cac0f3798c14d9 exclude this file from scan-build and sonar analysis, as the uninitialized value is intentional --- diff --git a/sonar-project.properties b/sonar-project.properties index b87ed17934..86aea6c839 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -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) diff --git a/teshsuite/smpi/replay-ti-colls/replay-ti-colls.c b/teshsuite/smpi/replay-ti-colls/replay-ti-colls.c index aac46105e0..2f4955ad67 100644 --- a/teshsuite/smpi/replay-ti-colls/replay-ti-colls.c +++ b/teshsuite/smpi/replay-ti-colls/replay-ti-colls.c @@ -1,3 +1,6 @@ +//exclude from clang static analysis, as there is an intentional uninitialized value passed to MPI calls. +#ifndef __clang_analyzer__ + #include #include #include "mpi.h" @@ -97,3 +100,5 @@ main (int argc, char **argv){ MPI_Finalize (); return 0; } + +#endif \ No newline at end of file