Ver código fonte

minor fixes for cppcheck-detected warnings

Nathalie Furmento 8 anos atrás
pai
commit
8503b1867e

+ 1 - 1
mpi/examples/stencil/stencil5_lb.c

@@ -88,7 +88,7 @@ static void parse_args(int argc, char **argv)
 
 void get_neighbors(int **neighbor_ids, int *nneighbors)
 {
-	int ret, rank, size;
+	int rank, size;
 	starpu_mpi_comm_rank(MPI_COMM_WORLD, &rank);
 	starpu_mpi_comm_size(MPI_COMM_WORLD, &size);
 

+ 2 - 2
src/debug/traces/starpu_fxt.c

@@ -1340,9 +1340,9 @@ static void handle_end_codelet_body(struct fxt_ev_64 *ev, struct starpu_fxt_opti
 	poti_SetVariable(task->start_time, container, "gf", gflops);
 	poti_SetVariable(end_codelet_time, container, "gf", 0);
 #else
-	fprintf(out_paje_file, "13	%.9f	%sw%u	gf	%f\n",
+	fprintf(out_paje_file, "13	%.9f	%sw%d	gf	%f\n",
 			task->start_time, prefix, worker, gflops);
-	fprintf(out_paje_file, "13	%.9f	%sw%u	gf	%f\n",
+	fprintf(out_paje_file, "13	%.9f	%sw%d	gf	%f\n",
 			end_codelet_time, prefix, worker, 0.);
 #endif
 

+ 2 - 2
tools/cppcheck/suppressions.txt

@@ -42,11 +42,11 @@ unusedStructMember:src/core/perfmodel/perfmodel_bus.c:65
 unusedStructMember:src/core/perfmodel/perfmodel_bus.c:66
 unusedStructMember:src/core/simgrid.c:225
 unusedStructMember:src/core/simgrid.c:226
-wrongPrintfScanfArgNum:src/core/simgrid.c:719
+wrongPrintfScanfArgNum:src/core/simgrid.c:731
 duplicateExpression:src/util/starpu_task_insert.c:52
 
 // TODO: this could be an error?
-redundantCopy:src/core/disk_ops/disk_leveldb.cpp:192
+redundantCopy:src/core/disk_ops/disk_leveldb.cpp:194
 
 nullPointerRedundantCheck:src/common/rbtree.c
 unreadVariable:src/datawizard/interfaces/*