public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: James Greenhalgh <james.greenhalgh@arm.com>
To: gcc-patches@gcc.gnu.org
Cc: marcus.shawcroft@arm.com
Subject: [AArch64] Fix some warnings about unused variables.
Date: Tue, 18 Dec 2012 14:02:00 -0000	[thread overview]
Message-ID: <1355839344-13411-1-git-send-email-james.greenhalgh@arm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-AArch64-Fix-some-warnings-about-unused-variables.patch --]
[-- Type: text/x-patch;  name=0001-AArch64-Fix-some-warnings-about-unused-variables.patch, Size: 909 bytes --]

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);
 

             reply	other threads:[~2012-12-18 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 14:02 James Greenhalgh [this message]
2012-12-18 16:36 ` Richard Earnshaw
2013-01-02 16:25   ` James Greenhalgh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1355839344-13411-1-git-send-email-james.greenhalgh@arm.com \
    --to=james.greenhalgh@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=marcus.shawcroft@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).