This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[AArch64] Fix some warnings about unused variables.


Hi,

This straightforward patch fixes the following warnings I see when building
for AArch64.

gcc/config/aarch64/aarch64.c:6385:7: warning: unused variable âregâ [-Wunused-variable]
gcc/config/aarch64/aarch64.c:6385:12: warning: unused variable âmemâ [-Wunused-variable]
gcc/config/aarch64/aarch64.c:6385:17: warning: unused variable âaddrâ [-Wunused-variable]
gcc/config/aarch64/aarch64.c:6386:7: warning: unused variable âloadâ [-Wunused-variable]
gcc/config/aarch64/aarch64.c:6669:17: warning: variable âmod_sâ set but not used [-Wunused-but-set-variable]

Regression tested on aarch64-none-elf with no regressions and checked
to ensure that the warnings go away.

OK to commit?

Thanks,
James Greenhalgh

---
gcc/

2012-12-18  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c (aarch64_simd_attr_length_move):
	Remove unused variables.
	(aarch64_split_compare_and_swap): Likewise.
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 09b1777..03b1361 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6382,8 +6382,6 @@ aarch64_simd_disambiguate_copy (rtx *operands, rtx *dest,
 int
 aarch64_simd_attr_length_move (rtx insn)
 {
-  rtx reg, mem, addr;
-  int load;
   enum machine_mode mode;
 
   extract_insn_cached (insn);
@@ -6666,7 +6664,6 @@ aarch64_split_compare_and_swap (rtx operands[])
 {
   rtx rval, mem, oldval, newval, scratch;
   enum machine_mode mode;
-  enum memmodel mod_s;
   bool is_weak;
   rtx label1, label2, x, cond;
 
@@ -6675,7 +6672,6 @@ aarch64_split_compare_and_swap (rtx operands[])
   oldval = operands[2];
   newval = operands[3];
   is_weak = (operands[4] != const0_rtx);
-  mod_s = (enum memmodel) INTVAL (operands[5]);
   scratch = operands[7];
   mode = GET_MODE (mem);
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]