Bladeren bron

minor fixes following compiler warnings

Nathalie Furmento 5 jaren geleden
bovenliggende
commit
96ddf670aa

+ 3 - 2
mpi/examples/matrix_decomposition/mpi_cholesky_codelets.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2015,2017,2018                      CNRS
+ * Copyright (C) 2010-2015,2017,2018,2020                 CNRS
  * Copyright (C) 2009,2010,2014,2015,2017,2018            Université de Bordeaux
  * Copyright (C) 2013                                     Inria
  *
@@ -20,6 +20,7 @@
 #include <common/blas.h>
 #include <sys/time.h>
 #include <limits.h>
+#include <math.h>
 
 /*
  *	Create the codelets
@@ -254,7 +255,7 @@ void dw_cholesky_check_computation(float ***matA, int rank, int nodes, int *corr
 						if (i <= j)
 						{
 							float orig = (1.0f/(1.0f+i+j)) + ((i == j)?1.0f*size:0.0f);
-							float err = abs(test_mat[j +i*size] - orig);
+							float err = fabsf(test_mat[j +i*size] - orig);
 							if (err > 0.00001)
 							{
 								FPRINTF(stderr, "[%d] Error[%u, %u] --> %2.2f != %2.2f (err %2.2f)\n", rank, i, j, test_mat[j +i*size], orig, err);

+ 2 - 1
src/datawizard/memalloc.c

@@ -3,7 +3,7 @@
  * Copyright (C) 2011-2013,2016,2017                      Inria
  * Copyright (C) 2008-2019                                Université de Bordeaux
  * Copyright (C) 2018                                     Federal University of Rio Grande do Sul (UFRGS)
- * Copyright (C) 2010-2017,2019                           CNRS
+ * Copyright (C) 2010-2017,2019,2020                      CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -161,6 +161,7 @@ void _starpu_mem_chunk_init_last(void)
 /* A disk was registered, RAM is now evictable */
 void _starpu_mem_chunk_disk_register(unsigned disk_memnode)
 {
+	(void) disk_memnode;
 	unsigned nnodes = starpu_memory_nodes_get_count(), i;
 
 	for (i = 0; i < nnodes; i++)

+ 13 - 9
src/util/openmp_runtime_support_omp_api.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2014,2015,2017                           CNRS
+ * Copyright (C) 2014,2015,2017,2020                      CNRS
  * Copyright (C) 2014-2016                                Inria
  * Copyright (C) 2015                                     Université de Bordeaux
  *
@@ -208,30 +208,34 @@ int starpu_omp_get_num_places(void)
 
 int starpu_omp_get_place_num_procs(int place_num)
 {
-  /* TODO */
-  return 0;
+	(void) place_num;
+	/* TODO */
+	return 0;
 }
 
 void starpu_omp_get_place_proc_ids(int place_num, int *ids)
 {
-  /* TODO */
+	(void) place_num;
+	(void) ids;
+	/* TODO */
 }
 
 int starpu_omp_get_place_num(void)
 {
-  /* TODO */
-  return -1;
+	/* TODO */
+	return -1;
 }
 
 int starpu_omp_get_partition_num_places(void)
 {
-  /* TODO */
-  return 0;
+	/* TODO */
+	return 0;
 }
 
 void starpu_omp_get_partition_place_nums(int *place_nums)
 {
-  /* TODO */
+	(void) place_nums;
+	/* TODO */
 }
 
 void starpu_omp_set_default_device(int device_num)

+ 3 - 1
tests/loader.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011,2012,2017                           Inria
- * Copyright (C) 2011-2019                                CNRS
+ * Copyright (C) 2011-2020                                CNRS
  * Copyright (C) 2010,2014-2018                           Université de Bordeaux
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -170,6 +170,7 @@ static void test_cleaner(int sig)
 {
 	pid_t child_gid;
 	int status;
+	(void) sig;
 
 	// send signal to all loader family members
 	fprintf(stderr, "[error] test %s has been blocked for %d seconds. Mark it as failed\n", test_name, timeout);
@@ -225,6 +226,7 @@ int main(int argc, char *argv[])
 	double timing;
 	int x=1;
 
+	(void) argc;
 	test_args = NULL;
 	timeout = 0;