浏览代码

src: fixes minor gcc warnings

Nathalie Furmento 6 年之前
父节点
当前提交
c802a93c0c

+ 1 - 1
src/core/perfmodel/multiple_regression.c

@@ -283,7 +283,7 @@ int _starpu_multiple_regression(struct starpu_perfmodel_history_list *ptr, doubl
 	snprintf(directory, sizeof(directory), "%s/.starpu/sampling/codelets/tmp", _starpu_get_home_path());
 	_starpu_mkpath_and_check(directory, S_IRWXU);
 
-	char filepath[300];
+	char filepath[400];
 	snprintf(filepath, sizeof(filepath), "%s/%s.out", directory,codelet_name);
 
 	unsigned long old_lines=0;

+ 2 - 2
src/datawizard/interfaces/bcsr_filters.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2008-2011,2013,2014,2016,2019            Université de Bordeaux
  * Copyright (C) 2010                                     Mehdi Juhoor
- * Copyright (C) 2010,2011,2013,2015,2017                 CNRS
+ * Copyright (C) 2010,2011,2013,2015,2017,2019            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
@@ -51,7 +51,7 @@ void starpu_bcsr_filter_canonical_block(void *father_interface, void *child_inte
 	}
 }
 
-struct starpu_data_interface_ops *starpu_bcsr_filter_canonical_block_child_ops(STARPU_ATTRIBUTE_UNUSED struct starpu_data_filter *f, unsigned child)
+struct starpu_data_interface_ops *starpu_bcsr_filter_canonical_block_child_ops(STARPU_ATTRIBUTE_UNUSED struct starpu_data_filter *f, STARPU_ATTRIBUTE_UNUSED unsigned child)
 {
 	return &starpu_interface_matrix_ops;
 }

+ 3 - 3
src/drivers/cuda/driver_cuda.c

@@ -717,9 +717,9 @@ int _starpu_cuda_driver_init(struct _starpu_worker_set *worker_set)
 		const char *devname = "Simgrid";
 #else
 		/* get the device's name */
-		char devname[128];
-		strncpy(devname, props[devid].name, 127);
-		devname[127] = 0;
+		char devname[16];
+		strncpy(devname, props[devid].name, 15);
+		devname[15] = 0;
 #endif
 
 #if defined(STARPU_HAVE_BUSID) && !defined(STARPU_SIMGRID)

+ 2 - 2
src/drivers/opencl/driver_opencl.c

@@ -641,8 +641,8 @@ int _starpu_opencl_driver_init(struct _starpu_worker *worker)
 	const char *devname = "Simgrid";
 #else
 	/* get the device's name */
-	char devname[128];
-	_starpu_opencl_get_device_name(devid, devname, 128);
+	char devname[32];
+	_starpu_opencl_get_device_name(devid, devname, 32);
 #endif
 	snprintf(worker->name, sizeof(worker->name), "OpenCL %d (%s %.1f GiB)", devid, devname, size);
 	snprintf(worker->short_name, sizeof(worker->short_name), "OpenCL %d", devid);

+ 2 - 2
src/drivers/opencl/driver_opencl_utils.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010-2018                                Université de Bordeaux
  * Copyright (C) 2011,2012,2016                           Inria
- * Copyright (C) 2010-2018                                CNRS
+ * Copyright (C) 2010-2019                                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
@@ -335,7 +335,7 @@ int _starpu_opencl_compile_or_load_opencl_from_string(const char *opencl_program
 		}
 		else
 		{
-			char binary_file_name[1024];
+			char binary_file_name[2048];
 			char *binary;
 			size_t binary_len;
 			FILE *fh;