ソースを参照

minor fixes following sonar scanner warnings

Nathalie Furmento 7 年 前
コミット
537122f7f4

+ 2 - 2
src/core/perfmodel/perfmodel.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2017  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015  CNRS
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2017  CNRS
  * Copyright (C) 2011  Télécom-SudParis
  * Copyright (C) 2016  Inria
  *
@@ -98,7 +98,7 @@ int *_starpu_get_opencl_affinity_vector(unsigned gpuid);
 void _starpu_save_bandwidth_and_latency_disk(double bandwidth_write, double bandwidth_read,
 					     double latency_write, double latency_read, unsigned node, const char *name);
 
-void _starpu_write_double(FILE *f, char *format, double val);
+void _starpu_write_double(FILE *f, const char *format, double val);
 int _starpu_read_double(FILE *f, char *format, double *val);
 void _starpu_simgrid_get_platform_path(int version, char *path, size_t maxlen);
 

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

@@ -47,7 +47,7 @@ void _starpu_read_spaces(FILE *f)
 }
 #endif /* _STARPU_OWN_NAN */
 
-void _starpu_write_double(FILE *f, char *format, double val)
+void _starpu_write_double(FILE *f, const char *format, double val)
 {
 #if _STARPU_OWN_NAN == 1
         if (isnan(val))

+ 3 - 3
tools/starpu_calibrate_bus.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011, 2012  CNRS
+ * Copyright (C) 2011, 2012, 2017  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
@@ -28,13 +28,13 @@ static void usage(void)
 		(void) fprintf(stdout,
 "Force a bus calibration.\n\
 \n\
-Usage: " PROGNAME " [OPTION]\n\
+Usage: %s [OPTION]\n\
 \n\
 Options:\n\
 	-h, --help       display this help and exit\n\
 	-v, --version    output version information and exit\n\
 \n\
-Report bugs to <" PACKAGE_BUGREPORT ">.\n");
+Report bugs to <%s>.\n", PROGNAME, PACKAGE_BUGREPORT);
 }
 
 static void parse_args(int argc, char **argv)

+ 2 - 2
tools/starpu_fxt_data_trace.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2013       Joris Pablo
  * Copyright (C) 2011-2014, 2016  Universite de Bordeaux
- * Copyright (C) 2014, 2015       CNRS
+ * Copyright (C) 2014, 2015, 2017       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
@@ -34,7 +34,7 @@ static void usage()
 	fprintf(stderr, "   -v, --version       output version information and exit\n\n");
 	fprintf(stderr, "    filename           specify the FxT trace input file.\n");
 	fprintf(stderr, "    codeletX           specify the codelet name to profile (by default, all codelets are profiled)\n");
-        fprintf(stderr, "Report bugs to <"PACKAGE_BUGREPORT">.");
+        fprintf(stderr, "Report bugs to <%s>.", PACKAGE_BUGREPORT);
         fprintf(stderr, "\n");
 }
 

+ 1 - 1
tools/starpu_fxt_stats.c

@@ -47,7 +47,7 @@ static void usage()
         fprintf(stderr, "   -o <output file>    specify the output file\n");
 	fprintf(stderr, "   -h, --help          display this help and exit\n");
 	fprintf(stderr, "   -v, --version       output version information and exit\n\n");
-        fprintf(stderr, "Report bugs to <"PACKAGE_BUGREPORT">.");
+        fprintf(stderr, "Report bugs to <%s>.", PACKAGE_BUGREPORT);
         fprintf(stderr, "\n");
 }
 

+ 2 - 2
tools/starpu_fxt_tool.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011-2014, 2016-2017  Universite de Bordeaux
- * Copyright (C) 2012-2015  CNRS
+ * Copyright (C) 2012-2015, 2017  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
@@ -42,7 +42,7 @@ static void usage()
 	fprintf(stderr, "   -no-smooth          avoid smoothing values for gflops etc.\n");
 	fprintf(stderr, "   -h, --help          display this help and exit\n");
 	fprintf(stderr, "   -v, --version       output version information and exit\n\n");
-        fprintf(stderr, "Report bugs to <"PACKAGE_BUGREPORT">.");
+        fprintf(stderr, "Report bugs to <%s>.", PACKAGE_BUGREPORT);
         fprintf(stderr, "\n");
 }
 

+ 2 - 2
tools/starpu_lp2paje.c

@@ -43,12 +43,12 @@ int main(int argc, char *argv[])
 	{
 		if (strcmp(argv[1], "-v") == 0 || strcmp(argv[1], "--version") == 0)
 		{
-			fprintf(stderr, PROGNAME " (" PACKAGE_NAME ") " PACKAGE_VERSION "\n");
+			fprintf(stderr, "%s (%s) %s\n", PROGNAME, PACKAGE_NAME, PACKAGE_VERSION);
 			exit(EXIT_SUCCESS);
 		}
 		fprintf(stderr, "Convert schedule optimized by lp into the Paje format\n\n");
 		fprintf(stderr, "Usage: lp_solve file.lp | %s > paje.trace\n", PROGNAME);
-		fprintf(stderr, "Report bugs to <"PACKAGE_BUGREPORT">.");
+		fprintf(stderr, "Report bugs to <%s>.", PACKAGE_BUGREPORT);
 		fprintf(stderr, "\n");
 		exit(EXIT_SUCCESS);
 	}

+ 1 - 1
tools/starpu_machine_display.c

@@ -34,7 +34,7 @@ static void usage()
 	fprintf(stderr, "\t-i, --info       display the name of the files containing the information\n");
 	fprintf(stderr, "\t-f, --force      force bus sampling and show measures \n");
 	fprintf(stderr, "\n");
-	fprintf(stderr, "Report bugs to <" PACKAGE_BUGREPORT ">.\n");
+	fprintf(stderr, "Report bugs to <%s>.\n", PACKAGE_BUGREPORT);
 }
 
 static void display_combined_worker(unsigned workerid)

+ 2 - 2
tools/starpu_perfmodel_display.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011, 2013-2014, 2017  Université de Bordeaux
- * Copyright (C) 2011, 2012, 2013, 2014, 2016  CNRS
+ * Copyright (C) 2011, 2012, 2013, 2014, 2016, 2017  CNRS
  * Copyright (C) 2011  Télécom-SudParis
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -59,7 +59,7 @@ static void usage()
 	fprintf(stderr, "   -d                  display the directory storing performance models\n");
 	fprintf(stderr, "   -h, --help          display this help and exit\n");
 	fprintf(stderr, "   -v, --version       output version information and exit\n\n");
-        fprintf(stderr, "Report bugs to <"PACKAGE_BUGREPORT">.");
+        fprintf(stderr, "Report bugs to <%s>.", PACKAGE_BUGREPORT);
         fprintf(stderr, "\n");
 }
 

+ 1 - 1
tools/starpu_tasks_rec_complete.c

@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
 			fprintf(stderr, "\n");
 			fprintf(stderr, "If input or output file names are not given, stdin and stdout are used.");
 			fprintf(stderr, "\n");
-			fprintf(stderr, "Report bugs to <" PACKAGE_BUGREPORT ">.\n");
+			fprintf(stderr, "Report bugs to <%s>.\n", PACKAGE_BUGREPORT);
 			exit(EXIT_SUCCESS);
 		}
 	}