瀏覽代碼

examples/: move cppcheck suppression rules from source code to dedicated file

Nathalie Furmento 8 年之前
父節點
當前提交
228aed0e3c
共有 3 個文件被更改,包括 8 次插入3 次删除
  1. 0 1
      examples/sched_ctx/two_cpu_contexts.c
  2. 0 2
      examples/stencil/stencil-tasks.c
  3. 8 0
      tools/cppcheck/suppressions.txt

+ 0 - 1
examples/sched_ctx/two_cpu_contexts.c

@@ -73,7 +73,6 @@ int main(int argc, char **argv)
 	}
 
         /* create sched context 1 with default policy, by giving a NULL policy name */
-	// cppcheck-suppress varFuncNullUB
 	unsigned sched_ctx1 = starpu_sched_ctx_create(procs1, nprocs1, "ctx1", STARPU_SCHED_CTX_POLICY_NAME, NULL, 0);
         /* create sched context 2 with a user selected policy name */
 	unsigned sched_ctx2 = starpu_sched_ctx_create(procs2, nprocs2, "ctx2", STARPU_SCHED_CTX_POLICY_NAME, "eager", 0);

+ 0 - 2
examples/stencil/stencil-tasks.c

@@ -197,11 +197,9 @@ void create_task_update(unsigned iter, unsigned z, int local_rank)
 	task->handles[1] = descr->layers_handle[old_layer];
 
 	task->handles[2] = descr->boundaries_handle[T][new_layer];
-	// cppcheck-suppress negativeIndex
 	task->handles[3] = descr->boundaries_handle[T][old_layer];
 
 	task->handles[4] = descr->boundaries_handle[B][new_layer];
-	// cppcheck-suppress negativeIndex
 	task->handles[5] = descr->boundaries_handle[B][old_layer];
 
 	task->cl = &cl_update;

+ 8 - 0
tools/cppcheck/suppressions.txt

@@ -2,3 +2,11 @@ memleakOnRealloc
 knownConditionTrueFalse
 variableScope
 constStatement:examples/stencil/*
+unreadVariable:tests/openmp/*
+unusedLabel:tests/datawizard/gpu_register.c
+unusedLabel:tests/datawizard/gpu_ptr_register.c
+varFuncNullUB:examples/sched_ctx/two_cpu_contexts.c:76
+negativeIndex:examples/stencil/stencil-tasks.c:200
+negativeIndex:examples/stencil/stencil-tasks.c:203
+
+