From 5a8eb7ee096b6ba15106e97f69709a97753a41e5 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 15 Sep 2011 16:20:18 +0200 Subject: [PATCH 1/1] fix some unused-but-set-variable warnings comming from gcc 4.6 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 | 3 +-- teshsuite/gras/datadesc/datadesc_usage.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gras/DataDesc/ddt_parse.c b/src/gras/DataDesc/ddt_parse.c index fc02a6f23d..8e5df24d83 100644 --- a/src/gras/DataDesc/ddt_parse.c +++ b/src/gras/DataDesc/ddt_parse.c @@ -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); diff --git a/teshsuite/gras/datadesc/datadesc_usage.c b/teshsuite/gras/datadesc/datadesc_usage.c index 10a5e8b1e8..3c2bc0f911 100644 --- a/teshsuite/gras/datadesc/datadesc_usage.c +++ b/teshsuite/gras/datadesc/datadesc_usage.c @@ -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; -- 2.20.1