From 12fe4621bfe1266d2c374c053aa031a435b8661f Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Thu, 15 Oct 1998 07:04:49 +0000 Subject: [PATCH] Warning fixes: * expr.c (build_chill_card): Use &&, not &, when comparing truth values. * parse.c (parse_spec_module): Remove unused variable `module_name', but preserve function call from initialization. (parse_operand6): Mark variable `location' with ATTRIBUTE_UNUSED. * inout.c (init_text_location): Remove unused variable `textlength'. From-SVN: r23106 --- gcc/ch/ChangeLog | 11 +++++++++++ gcc/ch/expr.c | 3 ++- gcc/ch/inout.c | 1 - gcc/ch/parse.c | 5 +++-- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog index d5b9230e388f..fe6b319236b5 100644 --- a/gcc/ch/ChangeLog +++ b/gcc/ch/ChangeLog @@ -1,3 +1,14 @@ +Thu Oct 15 09:25:21 1998 Kaveh R. Ghazi + + * expr.c (build_chill_card): Use &&, not &, when comparing truth + values. + + * parse.c (parse_spec_module): Remove unused variable + `module_name', but preserve function call from initialization. + (parse_operand6): Mark variable `location' with ATTRIBUTE_UNUSED. + + * inout.c (init_text_location): Remove unused variable `textlength'. + Wed Oct 14 22:19:48 1998 Kaveh R. Ghazi * typeck.c (build_chill_cast): Fix typo in assignment statement. diff --git a/gcc/ch/expr.c b/gcc/ch/expr.c index acc1bc7ec043..0825ce6d5957 100644 --- a/gcc/ch/expr.c +++ b/gcc/ch/expr.c @@ -1372,7 +1372,8 @@ build_chill_card (powerset) { int size; /* Do constant folding, if possible. */ - if (TREE_CODE (powerset) == CONSTRUCTOR & TREE_CONSTANT (powerset) + if (TREE_CODE (powerset) == CONSTRUCTOR + && TREE_CONSTANT (powerset) && (size = int_size_in_bytes (TREE_TYPE (powerset))) >= 0) { int bit_size = size * BITS_PER_UNIT; diff --git a/gcc/ch/inout.c b/gcc/ch/inout.c index c9af8160bd60..c191c9160cb1 100644 --- a/gcc/ch/inout.c +++ b/gcc/ch/inout.c @@ -2221,7 +2221,6 @@ void init_text_location (decl, type) tree type; { tree indexmode = text_indexmode (type); - tree textlength = text_length (type); unsigned long accessflags = 0; unsigned long textflags = IO_TEXTLOCATION; tree lowindex = integer_zero_node; diff --git a/gcc/ch/parse.c b/gcc/ch/parse.c index 7a9ae3dbfa92..bd9304cc6b5a 100644 --- a/gcc/ch/parse.c +++ b/gcc/ch/parse.c @@ -544,8 +544,9 @@ static void parse_spec_module (label) tree label; { - tree module_name = push_module (set_module_name (label), 1); int save_ignoring = ignoring; + + push_module (set_module_name (label), 1); ignoring = pass == 2; FORWARD_TOKEN(); /* SKIP SPEC */ expect (MODULE, "expected 'MODULE' here"); @@ -3144,7 +3145,7 @@ parse_operand6 () { if (check_token (RECEIVE)) { - tree location = parse_primval (); + tree location ATTRIBUTE_UNUSED = parse_primval (); sorry ("RECEIVE expression"); return integer_one_node; } -- 2.43.5