Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[gras] Don't define variables twice.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 18 May 2011 12:30:38 +0000 (14:30 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 18 May 2011 14:40:29 +0000 (16:40 +0200)
Declare them "extern" in include files.
Found by compiling with "-fno-common".

src/bindings/lua/simgrid_lua.h
tools/gras/gras_stub_generator.h
tools/gras/stub_generator.c
tools/gras/unix_stub_generator.c

index 56aa8ed..9177495 100644 (file)
@@ -23,9 +23,9 @@
 #include <stdarg.h>
 
 
-xbt_dict_t process_function_set;
-xbt_dynar_t process_list;
-xbt_dict_t machine_set;
+extern xbt_dict_t process_function_set;
+extern xbt_dynar_t process_list;
+extern xbt_dict_t machine_set;
 
 typedef struct s_process_t {
   int argc;
index 189f7b6..e50590f 100644 (file)
 
 #include "xbt/dynar.h"
 #include "xbt/dict.h"
-xbt_dict_t process_function_set;
-xbt_dynar_t process_list;
-xbt_dict_t machine_set;
+extern xbt_dict_t process_function_set;
+extern xbt_dynar_t process_list;
+extern xbt_dict_t machine_set;
+extern char *warning;
 
 typedef struct s_process_t {
   int argc;
   char **argv;
   char *host;
 } s_process_t;
-char *warning;
 
 void s_process_free(void *process);
 
index 0b1bd17..dfe760c 100644 (file)
@@ -40,6 +40,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(stubgen, gras, "Stub generator");
 xbt_dict_t process_function_set = NULL;
 xbt_dynar_t process_list = NULL;
 xbt_dict_t machine_set = NULL;
+char *warning = NULL;
 
 void s_process_free(void *process)
 {
index fade69b..42aabfc 100644 (file)
@@ -58,8 +58,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(stubgen);
 #define MAKEFILE_FILENAME_REMOTE  "%s.Makefile.remote"
 #define DEPLOYMENT  "%s.deploy.sh"
 
-char *warning = NULL;
-
 /**********************************************/
 /**** Generate the file for the simulator *****/
 /**********************************************/