This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: New ARI warning Wed May 27 01:54:00 UTC 2015
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: GDB Administrator <gdbadmin at sourceware dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 27 May 2015 11:35:03 +0100
- Subject: Re: New ARI warning Wed May 27 01:54:00 UTC 2015
- Authentication-results: sourceware.org; auth=none
- References: <20150527015400 dot GA43207 at sourceware dot org>
GDB Administrator <gdbadmin@sourceware.org> writes:
> 0a1,4
>> gdb/aarch64-tdep.c:3009: code: OP eol: Do not use &&, or || at the
>> end of a line
> gdb/aarch64-tdep.c:3009: if (!bits (aarch64_insn_r->aarch64_insn, 2,
> 4) &&
>> gdb/aarch64-tdep.c:3010: code: OP eol: Do not use &&, or || at the
>> end of a line
> gdb/aarch64-tdep.c:3010: !bits (aarch64_insn_r->aarch64_insn, 21, 23)
> &&
>> gdb/aarch64-tdep.c:3413: code: OP eol: Do not use &&, or || at the
>> end of a line
> gdb/aarch64-tdep.c:3413: else if ((insn_bits24_27 & 0x0b) == 0x08 &&
> insn_bits28_29 == 0x03 &&
>> gdb/aarch64-tdep.c:3460: code: OP eol: Do not use &&, or || at the
>> end of a line
> gdb/aarch64-tdep.c:3460: else if ((insn_bits24_27 & 0x0b) == 0x08 &&
> insn_bits28_29 == 0x03 &&
Here is the patch to fix these warnings... I'll push it in.
--
Yao (éå)
From 5c1128d70c304927c2c86c3c227614f34d8f0070 Mon Sep 17 00:00:00 2001
From: Yao Qi <yao.qi@linaro.org>
Date: Wed, 27 May 2015 11:29:24 +0100
Subject: [PATCH] Fix ARI warnings in aarch64-tdep.c
This patch fixes some ARI warnings:
$ bash ./gdb/contrib/ari/gdb_ari.sh -Wall -Werror -Wari gdb/aarch64-tdep.c
gdb/aarch64-tdep.c:3009: code: Do not use &&, or || at the end of a line
gdb/aarch64-tdep.c:3010: code: Do not use &&, or || at the end of a line
gdb/aarch64-tdep.c:3413: code: Do not use &&, or || at the end of a line
gdb/aarch64-tdep.c:3460: code: Do not use &&, or || at the end of a line
This patch moves && from the end of line to the start of the line.
gdb:
2015-05-27 Yao Qi <yao.qi@linaro.org>
* aarch64-tdep.c (aarch64_record_branch_except_sys): Split lines
before operator &&.
(aarch64_record_load_store): Likewise.
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index d07b26c..9650a7a 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -3006,9 +3006,9 @@ aarch64_record_branch_except_sys (insn_decode_record *aarch64_insn_r)
/* Exception generation instructions. */
if (insn_bits24_27 == 0x04)
{
- if (!bits (aarch64_insn_r->aarch64_insn, 2, 4) &&
- !bits (aarch64_insn_r->aarch64_insn, 21, 23) &&
- bits (aarch64_insn_r->aarch64_insn, 0, 1) == 0x01)
+ if (!bits (aarch64_insn_r->aarch64_insn, 2, 4)
+ && !bits (aarch64_insn_r->aarch64_insn, 21, 23)
+ && bits (aarch64_insn_r->aarch64_insn, 0, 1) == 0x01)
{
ULONGEST svc_number;
@@ -3410,8 +3410,8 @@ aarch64_record_load_store (insn_decode_record *aarch64_insn_r)
}
}
/* Load/store register (register offset) instructions. */
- else if ((insn_bits24_27 & 0x0b) == 0x08 && insn_bits28_29 == 0x03 &&
- insn_bits10_11 == 0x02 && insn_bit21)
+ else if ((insn_bits24_27 & 0x0b) == 0x08 && insn_bits28_29 == 0x03
+ && insn_bits10_11 == 0x02 && insn_bit21)
{
if (record_debug)
{
@@ -3457,8 +3457,8 @@ aarch64_record_load_store (insn_decode_record *aarch64_insn_r)
}
}
/* Load/store register (immediate and unprivileged) instructions. */
- else if ((insn_bits24_27 & 0x0b) == 0x08 && insn_bits28_29 == 0x03 &&
- !insn_bit21)
+ else if ((insn_bits24_27 & 0x0b) == 0x08 && insn_bits28_29 == 0x03
+ && !insn_bit21)
{
if (record_debug)
{