[AArch64] Fix some warnings about unused variables.
Richard Earnshaw
rearnsha@arm.com
Tue Dec 18 16:36:00 GMT 2012
On 18/12/12 14:02, James Greenhalgh wrote:
> 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?
>
OK.
R.
> 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.
>
>
> 0001-AArch64-Fix-some-warnings-about-unused-variables.patch
>
>
> 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);
>
>
More information about the Gcc-patches
mailing list