Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix some unused-but-set-variable warnings comming from gcc 4.6
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 15 Sep 2011 14:20:18 +0000 (16:20 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 15 Sep 2011 14:37:43 +0000 (16:37 +0200)
I guess it was harmless before, but it's cleaner now. In particular,
the return value of gras_datadesc_by_symbol() is useless, but the side
effects are mandatory.

src/gras/DataDesc/ddt_parse.c
teshsuite/gras/datadesc/datadesc_usage.c

index fc02a6f..8e5df24 100644 (file)
@@ -704,7 +704,6 @@ static gras_datadesc_type_t parse_typedef(char *definition)
 
   s_type_modifier_t tm;
 
-  gras_datadesc_type_t struct_desc = NULL;
   gras_datadesc_type_t typedef_desc = NULL;
 
   XBT_IN("");
@@ -714,7 +713,7 @@ static gras_datadesc_type_t parse_typedef(char *definition)
   parse_type_modifier(&tm);
 
   if (tm.is_struct) {
-    struct_desc = parse_struct(definition);
+   gras_datadesc_type_t struct_desc = parse_struct(definition);
   }
 
   parse_type_modifier(&tm);
index 10a5e8b..3c2bc0f 100644 (file)
@@ -475,12 +475,11 @@ static void test_pbio(gras_socket_t sock, int direction)
 {
   int cpt;
   int cpt2;
-  gras_datadesc_type_t pbio_type;
   pbio_t i, j;
 
   XBT_INFO
       ("---- Test on the PBIO IEEE struct (also tests GRAS DEFINE TYPE) ----");
-  pbio_type = gras_datadesc_by_symbol(s_pbio);
+  gras_datadesc_by_symbol(s_pbio); 
 
   /* Fill in that damn struct */
   i.Cnstatv = 325115;