diff mbox

Committed: ATTRIBUTE_UNUSED in noce_emit_cmove / set_reload_reg

Message ID 20101104110745.my0vm5e08w4ws4wc-nzlynne@webmail.spamcop.net
State New
Headers show

Commit Message

Joern Rennecke Nov. 4, 2010, 3:07 p.m. UTC
Three more warnings when building mep-elf were due to missing ATTRIBUTE_UNUSED
markers in ifcvt.c / reload1.c .

In noce_emit_cmove, the variables target and unsignedp are unused if
HAVE_conditional_move is not defined.

In set_reload_reg, regno is 'set but not used' if HARD_REGNO_MODE_OK doesn't
use its first parameter.

bootstrapped on i686-pc-linux-gnu.

Checked in as obvious.
2010-11-04  Joern Rennecke  <amylaar@spamcop.net>

	PR bootstrap/44756
	* ifcvt.c (noce_emit_cmove): Add ATTRIBUTE_UNUSED to target and
	unsignedp.
	* reload1.c (set_reload_reg): Add ATTRIBUTE_UNUSED to regno.
diff mbox

Patch

Index: reload1.c
===================================================================
--- reload1.c	(revision 166238)
+++ reload1.c	(working copy)
@@ -6025,7 +6025,9 @@  failed_reload (rtx insn, int r)
 static int
 set_reload_reg (int i, int r)
 {
-  int regno;
+  /* regno is 'set but not used' if HARD_REGNO_MODE_OK doesn't use its first
+     parameter.  */
+  int regno ATTRIBUTE_UNUSED;
   rtx reg = spill_reg_rtx[i];
 
   if (reg == 0 || GET_MODE (reg) != rld[r].mode)
Index: ifcvt.c
===================================================================
--- ifcvt.c	(revision 166238)
+++ ifcvt.c	(working copy)
@@ -1332,8 +1332,8 @@  static rtx
 noce_emit_cmove (struct noce_if_info *if_info, rtx x, enum rtx_code code,
 		 rtx cmp_a, rtx cmp_b, rtx vfalse, rtx vtrue)
 {
-  rtx target;
-  int unsignedp;
+  rtx target ATTRIBUTE_UNUSED;
+  int unsignedp ATTRIBUTE_UNUSED;
 
   /* If earliest == jump, try to build the cmove insn directly.
      This is helpful when combine has created some complex condition