summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-07 20:27:37 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-07 20:27:37 +0000
commit4081d362fba108e17784f385774bfae44e2dcee2 (patch)
tree6753832a3718adf7bc216f0e33a4f7458672d44f
parent421351fbb102e20c5d53e67099dc7152dec6c00f (diff)
downloadgcc-4081d362fba108e17784f385774bfae44e2dcee2.tar.gz
* tree-ssa-pre.c (my_rev_post_order_compute): Remove set but not
used count variable. * genemit.c (gen_expand, gen_split): Avoid set but not used warnings when operandN variables aren't used in the body of the expander or splitter. * tree-outof-ssa.c (FOR_EACH_ELIM_GRAPH_SUCC, FOR_EACH_ELIM_GRAPH_PRED): Avoid set but not used warnings. * tree-ssa-operands.h (FOR_EACH_SSA_TREE_OPERAND): Likewise. * tree-flow.h (FOR_EACH_IMM_USE_FAST, FOR_EACH_IMM_USE_STMT, FOR_EACH_IMM_USE_ON_STMT): Likewise. * tree.h (FOR_EACH_CONSTRUCTOR_ELT): Likewise. * tree.c (PROCESS_ARG): Likewise. fortran/ * parse.c (parse_derived, parse_enum): Avoid set but not used warning. java/ * expr.c (process_jvm_instruction): Avoid set but not used warning. * builtins.c (compareAndSwapInt_builtin, compareAndSwapLong_builtin, getVolatile_builtin): Likewise. libjava/ * exception.cc (_Jv_Throw): Avoid set but not used warning. * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in sizeof to avoid set but not used warnings. libjava/classpath/ * native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaPortDevice.c (Java_gnu_javax_sound_midi_alsa_AlsaPortDevice_run_1receiver_1thread_1): Avoid set but not used warning. libiberty/ * regex.c (byte_re_match_2_internal): Avoid set but not used warning. gcc/testsuite/ * gcc.dg/builtin-choose-expr.c: Avoid set but not used warnings. * gcc.dg/trunc-1.c: Likewise. * gcc.dg/vla-9.c: Likewise. * gcc.dg/dfp/composite-type.c: Likewise. libffi/ * testsuite/libffi.call/err_bad_abi.c: Remove unused args variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158084 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog15
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/parse.c40
-rw-r--r--gcc/genemit.c20
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/builtins.c7
-rw-r--r--gcc/java/expr.c3
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gcc.dg/builtin-choose-expr.c2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/composite-type.c7
-rw-r--r--gcc/testsuite/gcc.dg/trunc-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/vla-9.c1
-rw-r--r--gcc/tree-flow.h8
-rw-r--r--gcc/tree-outof-ssa.c10
-rw-r--r--gcc/tree-ssa-operands.h5
-rw-r--r--gcc/tree-ssa-pre.c8
-rw-r--r--gcc/tree.c4
-rw-r--r--gcc/tree.h4
-rw-r--r--libffi/ChangeLog5
-rw-r--r--libffi/testsuite/libffi.call/err_bad_abi.c2
-rw-r--r--libiberty/regex.c6
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/classpath/ChangeLog.gcj6
-rw-r--r--libjava/classpath/native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaPortDevice.c9
-rw-r--r--libjava/exception.cc7
-rw-r--r--libjava/include/java-assert.h6
26 files changed, 118 insertions, 83 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2a6c5938422..1f32f76d46f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,18 @@
+2010-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ * tree-ssa-pre.c (my_rev_post_order_compute): Remove set but not
+ used count variable.
+ * genemit.c (gen_expand, gen_split): Avoid set but not used warnings
+ when operandN variables aren't used in the body of the expander
+ or splitter.
+ * tree-outof-ssa.c (FOR_EACH_ELIM_GRAPH_SUCC,
+ FOR_EACH_ELIM_GRAPH_PRED): Avoid set but not used warnings.
+ * tree-ssa-operands.h (FOR_EACH_SSA_TREE_OPERAND): Likewise.
+ * tree-flow.h (FOR_EACH_IMM_USE_FAST, FOR_EACH_IMM_USE_STMT,
+ FOR_EACH_IMM_USE_ON_STMT): Likewise.
+ * tree.h (FOR_EACH_CONSTRUCTOR_ELT): Likewise.
+ * tree.c (PROCESS_ARG): Likewise.
+
2010-04-07 Simon Baldwin <simonb@google.com>
* diagnostic.h (diagnostic_override_option_index): New macro to
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 1f46730e929..795eeb53296 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ * parse.c (parse_derived, parse_enum): Avoid set but not used
+ warning.
+
2010-04-07 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/40539
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index 190148c24ee..ef8931d2a2c 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -1968,14 +1968,12 @@ parse_derived_contains (void)
static void
parse_derived (void)
{
- int compiling_type, seen_private, seen_sequence, seen_component, error_flag;
+ int compiling_type, seen_private, seen_sequence, seen_component;
gfc_statement st;
gfc_state_data s;
gfc_symbol *sym;
gfc_component *c;
- error_flag = 0;
-
accept_statement (ST_DERIVED_DECL);
push_state (&s, COMP_DERIVED, gfc_new_block);
@@ -2002,18 +2000,15 @@ parse_derived (void)
case ST_FINAL:
gfc_error ("FINAL declaration at %C must be inside CONTAINS");
- error_flag = 1;
break;
case ST_END_TYPE:
endType:
compiling_type = 0;
- if (!seen_component
- && (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: Derived type "
- "definition at %C without components")
- == FAILURE))
- error_flag = 1;
+ if (!seen_component)
+ gfc_notify_std (GFC_STD_F2003, "Fortran 2003: Derived type "
+ "definition at %C without components");
accept_statement (ST_END_TYPE);
break;
@@ -2023,7 +2018,6 @@ endType:
{
gfc_error ("PRIVATE statement in TYPE at %C must be inside "
"a MODULE");
- error_flag = 1;
break;
}
@@ -2031,15 +2025,11 @@ endType:
{
gfc_error ("PRIVATE statement at %C must precede "
"structure components");
- error_flag = 1;
break;
}
if (seen_private)
- {
- gfc_error ("Duplicate PRIVATE statement at %C");
- error_flag = 1;
- }
+ gfc_error ("Duplicate PRIVATE statement at %C");
s.sym->component_access = ACCESS_PRIVATE;
@@ -2052,7 +2042,6 @@ endType:
{
gfc_error ("SEQUENCE statement at %C must precede "
"structure components");
- error_flag = 1;
break;
}
@@ -2063,7 +2052,6 @@ endType:
if (seen_sequence)
{
gfc_error ("Duplicate SEQUENCE statement at %C");
- error_flag = 1;
}
seen_sequence = 1;
@@ -2072,14 +2060,12 @@ endType:
break;
case ST_CONTAINS:
- if (gfc_notify_std (GFC_STD_F2003,
- "Fortran 2003: CONTAINS block in derived type"
- " definition at %C") == FAILURE)
- error_flag = 1;
+ gfc_notify_std (GFC_STD_F2003,
+ "Fortran 2003: CONTAINS block in derived type"
+ " definition at %C");
accept_statement (ST_CONTAINS);
- if (parse_derived_contains ())
- error_flag = 1;
+ parse_derived_contains ();
goto endType;
default:
@@ -2138,14 +2124,11 @@ endType:
static void
parse_enum (void)
{
- int error_flag;
gfc_statement st;
int compiling_enum;
gfc_state_data s;
int seen_enumerator = 0;
- error_flag = 0;
-
push_state (&s, COMP_ENUM, gfc_new_block);
compiling_enum = 1;
@@ -2167,10 +2150,7 @@ parse_enum (void)
case ST_END_ENUM:
compiling_enum = 0;
if (!seen_enumerator)
- {
- gfc_error ("ENUM declaration at %C has no ENUMERATORS");
- error_flag = 1;
- }
+ gfc_error ("ENUM declaration at %C has no ENUMERATORS");
accept_statement (st);
break;
diff --git a/gcc/genemit.c b/gcc/genemit.c
index 7ac3c917067..1a6502585db 100644
--- a/gcc/genemit.c
+++ b/gcc/genemit.c
@@ -1,6 +1,6 @@
/* Generate code from machine description to emit insns as rtl.
Copyright (C) 1987, 1988, 1991, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
- 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GCC.
@@ -520,12 +520,13 @@ gen_expand (rtx expand)
(unless we aren't going to use them at all). */
if (XVEC (expand, 1) != 0)
{
- for (i = 0; i < operands; i++)
- printf (" operand%d = operands[%d];\n", i, i);
- for (; i <= max_dup_opno; i++)
- printf (" operand%d = operands[%d];\n", i, i);
- for (; i <= max_scratch_opno; i++)
- printf (" operand%d = operands[%d];\n", i, i);
+ for (i = 0;
+ i < MAX (operands, MAX (max_scratch_opno, max_dup_opno) + 1);
+ i++)
+ {
+ printf (" operand%d = operands[%d];\n", i, i);
+ printf (" (void) operand%d;\n", i);
+ }
}
printf (" }\n");
}
@@ -647,7 +648,10 @@ gen_split (rtx split)
/* Output code to copy the arguments back out of `operands' */
for (i = 0; i < operands; i++)
- printf (" operand%d = operands[%d];\n", i, i);
+ {
+ printf (" operand%d = operands[%d];\n", i, i);
+ printf (" (void) operand%d;\n", i);
+ }
/* Output code to construct the rtl for the instruction bodies.
Use emit_insn to add them to the sequence being accumulated.
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 3fefe43059a..f1a60807436 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ * exception.cc (_Jv_Throw): Avoid set but not used warning.
+ * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
+ sizeof to avoid set but not used warnings.
+
2010-01-20 Joern Rennecke <amylaar@spamcop.net>
* lang.c (java_post_options): Constify variable "dot".
diff --git a/gcc/java/builtins.c b/gcc/java/builtins.c
index 099b9e00cd8..a4f59f9fa7f 100644
--- a/gcc/java/builtins.c
+++ b/gcc/java/builtins.c
@@ -1,5 +1,5 @@
/* Built-in and inline functions for gcj
- Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2009
+ Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
@@ -323,6 +323,7 @@ compareAndSwapInt_builtin (tree method_return_type ATTRIBUTE_UNUSED,
{
tree addr, stmt;
UNMARSHAL5 (orig_call);
+ (void) value_type; /* Avoid set but not used warning. */
addr = build_addr_sum (int_type_node, obj_arg, offset_arg);
stmt = build_call_expr (built_in_decls[BUILT_IN_BOOL_COMPARE_AND_SWAP_4],
@@ -347,6 +348,7 @@ compareAndSwapLong_builtin (tree method_return_type ATTRIBUTE_UNUSED,
{
tree addr, stmt;
UNMARSHAL5 (orig_call);
+ (void) value_type; /* Avoid set but not used warning. */
addr = build_addr_sum (long_type_node, obj_arg, offset_arg);
stmt = build_call_expr (built_in_decls[BUILT_IN_BOOL_COMPARE_AND_SWAP_8],
@@ -410,7 +412,8 @@ getVolatile_builtin (tree method_return_type ATTRIBUTE_UNUSED,
{
tree addr, stmt, modify_stmt, tmp;
UNMARSHAL3 (orig_call);
-
+ (void) this_arg; /* Avoid set but not used warning. */
+
addr = build_addr_sum (method_return_type, obj_arg, offset_arg);
addr
= fold_convert (build_pointer_type (build_type_variant
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 3c0e2ca1572..a6a3f391a57 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1,6 +1,6 @@
/* Process expressions for the GNU compiler for the Java(TM) language.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
This file is part of GCC.
@@ -3329,6 +3329,7 @@ process_jvm_instruction (int PC, const unsigned char* byte_ops,
{ \
int saw_index = 0; \
int index = OPERAND_VALUE; \
+ (void) saw_index; /* Avoid set but not used warning. */ \
build_java_ret \
(find_local_variable (index, return_address_type_node, oldpc)); \
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5c313817f59..b7fb0c5b2ec 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2010-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/builtin-choose-expr.c: Avoid set but not used warnings.
+ * gcc.dg/trunc-1.c: Likewise.
+ * gcc.dg/vla-9.c: Likewise.
+ * gcc.dg/dfp/composite-type.c: Likewise.
+
2010-04-07 Iain Sandoe <iains@gcc.gnu.org>
PR objc/35996
diff --git a/gcc/testsuite/gcc.dg/builtin-choose-expr.c b/gcc/testsuite/gcc.dg/builtin-choose-expr.c
index 045dc6c41ff..ceac6051f78 100644
--- a/gcc/testsuite/gcc.dg/builtin-choose-expr.c
+++ b/gcc/testsuite/gcc.dg/builtin-choose-expr.c
@@ -29,6 +29,8 @@
t1 = t1b; \
t2 = t2a; \
t2 = t2b; \
+ (void) t1; \
+ (void) t2; \
} while (0)
diff --git a/gcc/testsuite/gcc.dg/dfp/composite-type.c b/gcc/testsuite/gcc.dg/dfp/composite-type.c
index 508ebbd5e29..69ecb1421c1 100644
--- a/gcc/testsuite/gcc.dg/dfp/composite-type.c
+++ b/gcc/testsuite/gcc.dg/dfp/composite-type.c
@@ -30,18 +30,19 @@ do \
d##TYPE = f2_##TYPE(h1_##TYPE); \
d##TYPE = f2_##TYPE(h2_##TYPE); \
d##TYPE = f2_##TYPE(h3_##TYPE); \
+ (void) d##TYPE; \
} while(0)
DECIMAL_COMPOSITE_DECL(32); /* { dg-error "incompatible types when assigning to type '\[^\n\]*' from type '\[^\n\]*'" } */
-/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } 35 } */
+/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } 36 } */
DECIMAL_COMPOSITE_DECL(64); /* { dg-error "incompatible types when assigning to type '\[^\n\]*' from type '\[^\n\]*'" } */
-/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } 39 } */
+/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } 40 } */
DECIMAL_COMPOSITE_DECL(128); /* { dg-error "incompatible types when assigning to type '\[^\n\]*' from type '\[^\n\]*'" } */
-/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } 43 } */
+/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } 44 } */
int main()
diff --git a/gcc/testsuite/gcc.dg/trunc-1.c b/gcc/testsuite/gcc.dg/trunc-1.c
index 0d6a48b4afd..a78cceb598a 100644
--- a/gcc/testsuite/gcc.dg/trunc-1.c
+++ b/gcc/testsuite/gcc.dg/trunc-1.c
@@ -11,5 +11,5 @@ main (void)
len = ~(sizeof (size_t) - 1); /* { dg-bogus "truncated" "bogus truncation warning" } */
- return 0;
+ return len - len;
}
diff --git a/gcc/testsuite/gcc.dg/vla-9.c b/gcc/testsuite/gcc.dg/vla-9.c
index 0b623b39da7..506a1a2eb14 100644
--- a/gcc/testsuite/gcc.dg/vla-9.c
+++ b/gcc/testsuite/gcc.dg/vla-9.c
@@ -6,4 +6,5 @@ void f(__SIZE_TYPE__ d)
{
typedef int t[d];
t *g = (__typeof (g)) d;
+ (void) g;
}
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 6cd47e13180..7bb5088e9e2 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -252,17 +252,17 @@ typedef struct immediate_use_iterator_d
/* Use this iterator when simply looking at stmts. Adding, deleting or
modifying stmts will cause this iterator to malfunction. */
-#define FOR_EACH_IMM_USE_FAST(DEST, ITER, SSAVAR) \
+#define FOR_EACH_IMM_USE_FAST(DEST, ITER, SSAVAR) \
for ((DEST) = first_readonly_imm_use (&(ITER), (SSAVAR)); \
!end_readonly_imm_use_p (&(ITER)); \
- (DEST) = next_readonly_imm_use (&(ITER)))
+ (void) ((DEST) = next_readonly_imm_use (&(ITER))))
/* Use this iterator to visit each stmt which has a use of SSAVAR. */
#define FOR_EACH_IMM_USE_STMT(STMT, ITER, SSAVAR) \
for ((STMT) = first_imm_use_stmt (&(ITER), (SSAVAR)); \
!end_imm_use_stmt_p (&(ITER)); \
- (STMT) = next_imm_use_stmt (&(ITER)))
+ (void) ((STMT) = next_imm_use_stmt (&(ITER))))
/* Use this to terminate the FOR_EACH_IMM_USE_STMT loop early. Failure to
do so will result in leaving a iterator marker node in the immediate
@@ -290,7 +290,7 @@ typedef struct immediate_use_iterator_d
#define FOR_EACH_IMM_USE_ON_STMT(DEST, ITER) \
for ((DEST) = first_imm_use_on_stmt (&(ITER)); \
!end_imm_use_on_stmt_p (&(ITER)); \
- (DEST) = next_imm_use_on_stmt (&(ITER)))
+ (void) ((DEST) = next_imm_use_on_stmt (&(ITER))))
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c
index ee70583422e..227b06fad85 100644
--- a/gcc/tree-outof-ssa.c
+++ b/gcc/tree-outof-ssa.c
@@ -452,8 +452,9 @@ do { \
y_ = VEC_index (int, (GRAPH)->edge_list, x_); \
if (y_ != (NODE)) \
continue; \
- (VAR) = VEC_index (int, (GRAPH)->edge_list, x_ + 1); \
- (LOCUS) = VEC_index (source_location, (GRAPH)->edge_locus, x_ / 2); \
+ (void) ((VAR) = VEC_index (int, (GRAPH)->edge_list, x_ + 1)); \
+ (void) ((LOCUS) = VEC_index (source_location, \
+ (GRAPH)->edge_locus, x_ / 2)); \
CODE; \
} \
} while (0)
@@ -472,8 +473,9 @@ do { \
y_ = VEC_index (int, (GRAPH)->edge_list, x_ + 1); \
if (y_ != (NODE)) \
continue; \
- (VAR) = VEC_index (int, (GRAPH)->edge_list, x_); \
- (LOCUS) = VEC_index (source_location, (GRAPH)->edge_locus, x_ / 2); \
+ (void) ((VAR) = VEC_index (int, (GRAPH)->edge_list, x_)); \
+ (void) ((LOCUS) = VEC_index (source_location, \
+ (GRAPH)->edge_locus, x_ / 2)); \
CODE; \
} \
} while (0)
diff --git a/gcc/tree-ssa-operands.h b/gcc/tree-ssa-operands.h
index a435fab0201..13d29c3ab01 100644
--- a/gcc/tree-ssa-operands.h
+++ b/gcc/tree-ssa-operands.h
@@ -1,5 +1,6 @@
/* SSA operand management for trees.
- Copyright (C) 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2006, 2007, 2008, 2010
+ Free Software Foundation, Inc.
This file is part of GCC.
@@ -160,7 +161,7 @@ typedef struct ssa_operand_iterator_d
#define FOR_EACH_SSA_TREE_OPERAND(TREEVAR, STMT, ITER, FLAGS) \
for (TREEVAR = op_iter_init_tree (&(ITER), STMT, FLAGS); \
!op_iter_done (&(ITER)); \
- TREEVAR = op_iter_next_tree (&(ITER)))
+ (void) (TREEVAR = op_iter_next_tree (&(ITER))))
/* This macro executes a loop over the operands of STMT specified in FLAG,
returning each operand as a 'use_operand_p' in the variable USEVAR.
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 2331e7b2249..35ce4ccd0e6 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -4498,7 +4498,6 @@ my_rev_post_order_compute (int *post_order, bool include_entry_exit)
int sp;
int post_order_num = 0;
sbitmap visited;
- int count;
if (include_entry_exit)
post_order[post_order_num++] = EXIT_BLOCK;
@@ -4553,12 +4552,7 @@ my_rev_post_order_compute (int *post_order, bool include_entry_exit)
}
if (include_entry_exit)
- {
- post_order[post_order_num++] = ENTRY_BLOCK;
- count = post_order_num;
- }
- else
- count = post_order_num + 2;
+ post_order[post_order_num++] = ENTRY_BLOCK;
free (stack);
sbitmap_free (visited);
diff --git a/gcc/tree.c b/gcc/tree.c
index 30bc5be66fe..5da82069131 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3652,9 +3652,9 @@ build1_stat (enum tree_code code, tree type, tree node MEM_STAT_DECL)
side_effects = 1; \
if (!TREE_READONLY (arg##N) \
&& !CONSTANT_CLASS_P (arg##N)) \
- read_only = 0; \
+ (void) (read_only = 0); \
if (!TREE_CONSTANT (arg##N)) \
- constant = 0; \
+ (void) (constant = 0); \
} \
} while (0)
diff --git a/gcc/tree.h b/gcc/tree.h
index c5c7b01e2e5..4a0fb5e6405 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1507,9 +1507,9 @@ struct GTY(()) tree_vec {
#define FOR_EACH_CONSTRUCTOR_ELT(V, IX, INDEX, VAL) \
for (IX = 0; (IX >= VEC_length (constructor_elt, V)) \
? false \
- : ((VAL = VEC_index (constructor_elt, V, IX)->value), \
+ : (((void) (VAL = VEC_index (constructor_elt, V, IX)->value)), \
(INDEX = VEC_index (constructor_elt, V, IX)->index), \
- true); \
+ true); \
(IX)++)
/* Append a new constructor element to V, with the specified INDEX and VAL. */
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 2d4ad866cc6..6abe696187f 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ * regex.c (byte_re_match_2_internal): Avoid set but not used
+ warning.
+
2010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in: Regenerate.
diff --git a/libffi/testsuite/libffi.call/err_bad_abi.c b/libffi/testsuite/libffi.call/err_bad_abi.c
index a21a3fddd04..ce0f3bb2782 100644
--- a/libffi/testsuite/libffi.call/err_bad_abi.c
+++ b/libffi/testsuite/libffi.call/err_bad_abi.c
@@ -17,11 +17,9 @@ int main (void)
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
- void* args[1];
ffi_type* arg_types[1];
arg_types[0] = NULL;
- args[0] = NULL;
CHECK(ffi_prep_cif(&cif, 255, 0, &ffi_type_void,
arg_types) == FFI_BAD_ABI);
diff --git a/libiberty/regex.c b/libiberty/regex.c
index ad496846904..420c7f4a47d 100644
--- a/libiberty/regex.c
+++ b/libiberty/regex.c
@@ -4,7 +4,7 @@
internationalization features.)
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2005 Free Software Foundation, Inc.
+ 2002, 2005, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -7140,8 +7140,8 @@ byte_re_match_2_internal (struct re_pattern_buffer *bufp,
register from the stack, since lowest will == highest in
`pop_failure_point'. */
active_reg_t dummy_low_reg, dummy_high_reg;
- UCHAR_T *pdummy = NULL;
- const CHAR_T *sdummy = NULL;
+ UCHAR_T *pdummy ATTRIBUTE_UNUSED = NULL;
+ const CHAR_T *sdummy ATTRIBUTE_UNUSED = NULL;
DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n");
POP_FAILURE_POINT (sdummy, pdummy,
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 0a46cf50d81..dd502d13c09 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ * exception.cc (_Jv_Throw): Avoid set but not used warning.
+ * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
+ sizeof to avoid set but not used warnings.
+
2010-04-07 Jason Merrill <jason@redhat.com>
* gnu/gcj/runtime/natSharedLibLoader.cc (findCore): Move
diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj
index b6256a9b159..43efda4dc3c 100644
--- a/libjava/classpath/ChangeLog.gcj
+++ b/libjava/classpath/ChangeLog.gcj
@@ -1,3 +1,9 @@
+2010-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ * native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaPortDevice.c
+ (Java_gnu_javax_sound_midi_alsa_AlsaPortDevice_run_1receiver_1thread_1):
+ Avoid set but not used warning.
+
2010-01-09 Jakub Jelinek <jakub@redhat.com>
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
diff --git a/libjava/classpath/native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaPortDevice.c b/libjava/classpath/native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaPortDevice.c
index f4f8dd84a06..d3e4f2b45a0 100644
--- a/libjava/classpath/native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaPortDevice.c
+++ b/libjava/classpath/native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaPortDevice.c
@@ -1,5 +1,5 @@
/* gnu_javax_sound_midi_alsa_AlsaPortDevice.c - Native support
- Copyright (C) 2005
+ Copyright (C) 2005, 2010
Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,7 +48,6 @@ Java_gnu_javax_sound_midi_alsa_AlsaPortDevice_run_1receiver_1thread_1
(JNIEnv *env, jobject this __attribute__((unused)),
jlong client, jlong port, jobject receiver)
{
- int rc;
snd_seq_port_info_t *pinfo, *sinfo;
snd_seq_port_subscribe_t *subs;
snd_seq_addr_t sender, dest;
@@ -58,12 +57,12 @@ Java_gnu_javax_sound_midi_alsa_AlsaPortDevice_run_1receiver_1thread_1
snd_seq_port_info_alloca (&sinfo);
snd_seq_port_subscribe_alloca (&subs);
- rc = snd_seq_open (&seq, "default", SND_SEQ_OPEN_DUPLEX, SND_SEQ_NONBLOCK);
+ snd_seq_open (&seq, "default", SND_SEQ_OPEN_DUPLEX, SND_SEQ_NONBLOCK);
snd_seq_port_info_set_capability (pinfo, SND_SEQ_PORT_CAP_WRITE);
snd_seq_port_info_set_type (pinfo, SND_SEQ_PORT_TYPE_MIDI_GENERIC);
- rc = snd_seq_create_port (seq, pinfo);
+ snd_seq_create_port (seq, pinfo);
sender.client = (int) client;
sender.port = (int) port;
@@ -72,7 +71,7 @@ Java_gnu_javax_sound_midi_alsa_AlsaPortDevice_run_1receiver_1thread_1
snd_seq_port_subscribe_set_sender (subs, &sender);
snd_seq_port_subscribe_set_dest (subs, &dest);
- rc = snd_seq_subscribe_port(seq, subs);
+ snd_seq_subscribe_port(seq, subs);
{
int npfd;
diff --git a/libjava/exception.cc b/libjava/exception.cc
index 8affbbe9fdf..76f145112ff 100644
--- a/libjava/exception.cc
+++ b/libjava/exception.cc
@@ -1,6 +1,6 @@
// Functions for Exception Support for Java.
-/* Copyright (C) 1998, 1999, 2001, 2002, 2006 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2001, 2002, 2006, 2010 Free Software Foundation
This file is part of libgcj.
@@ -111,11 +111,10 @@ _Jv_Throw (jthrowable value)
/* We're happy with setjmp/longjmp exceptions or region-based
exception handlers: entry points are provided here for both. */
- _Unwind_Reason_Code code;
#ifdef SJLJ_EXCEPTIONS
- code = _Unwind_SjLj_RaiseException (&xh->unwindHeader);
+ _Unwind_SjLj_RaiseException (&xh->unwindHeader);
#else
- code = _Unwind_RaiseException (&xh->unwindHeader);
+ _Unwind_RaiseException (&xh->unwindHeader);
#endif
/* If code == _URC_END_OF_STACK, then we reached top of stack without
diff --git a/libjava/include/java-assert.h b/libjava/include/java-assert.h
index 57962418b7d..1d3a49bfa38 100644
--- a/libjava/include/java-assert.h
+++ b/libjava/include/java-assert.h
@@ -1,6 +1,6 @@
// java-assert.h - Header file holding assertion definitions. -*- c++ -*-
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2010 Free Software Foundation
This file is part of libgcj.
@@ -29,8 +29,8 @@ void _Jv_Abort (const char *, const char *, int, const char *)
#else /* __GCJ_DEBUG */
#define _Jv_AssertDoCall(Message)
-#define JvAssertMessage(Expr, Message)
-#define JvAssert(Expr)
+#define JvAssertMessage(Expr, Message) (void) sizeof (Expr)
+#define JvAssert(Expr) (void) sizeof (Expr)
#define JvFail(Message) _Jv_Abort (0, 0, 0, Message)
#endif /* not __GCJ_DEBUG */