From patchwork Tue Oct 8 11:23:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 34871 Received: (qmail 24022 invoked by alias); 8 Oct 2019 11:25:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 22542 invoked by uid 89); 8 Oct 2019 11:24:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=ad, bf, ba, af X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Oct 2019 11:24:22 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x98BLxsd021492 for ; Tue, 8 Oct 2019 07:24:07 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2vgnjmh3yj-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 08 Oct 2019 07:24:07 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 8 Oct 2019 12:24:05 +0100 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 8 Oct 2019 12:24:04 +0100 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x98BO3En46203274 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Oct 2019 11:24:03 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1341BA4060; Tue, 8 Oct 2019 11:24:03 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DE860A405B; Tue, 8 Oct 2019 11:24:02 +0000 (GMT) Received: from oc0404454431.ibm.com (unknown [9.152.222.48]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 8 Oct 2019 11:24:02 +0000 (GMT) From: Andreas Arnez To: gdb-patches@sourceware.org Cc: Alan Hayward , Andrew Burgess Subject: [PATCH] gdb/testsuite: Fix typos in infcall-nested-structs.c Date: Tue, 08 Oct 2019 13:23:59 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 x-cbid: 19100811-0008-0000-0000-000003200CF1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19100811-0009-0000-0000-00004A3F0D7E Message-Id: Some of the comparison functions in infcall-nested-structs.c contain redundant comparisons like a. == a. instead of a. == b.. They were introduced with this commit: 36eb4c5f9bbe6 - "infcall-nested-structs: Test up to five fields" Fix the redundant comparisons. gdb/testsuite/ChangeLog: * gdb.base/infcall-nested-structs.c (cmp_struct_02_01) (cmp_struct_02_02, cmp_struct_04_01, cmp_struct_04_02) (cmp_struct_05_01, cmp_struct_static_02_01) (cmp_struct_static_04_01, cmp_struct_static_06_01): Fix redundant comparisons. --- .../gdb.base/infcall-nested-structs.c | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gdb/testsuite/gdb.base/infcall-nested-structs.c b/gdb/testsuite/gdb.base/infcall-nested-structs.c index b6f793e7a3..795ab4a3f9 100644 --- a/gdb/testsuite/gdb.base/infcall-nested-structs.c +++ b/gdb/testsuite/gdb.base/infcall-nested-structs.c @@ -141,7 +141,7 @@ int cmp_struct_01_04 (struct struct_01_04 a, struct struct_01_04 b) { return a.a == b.a; } int cmp_struct_02_01 (struct struct_02_01 a, struct struct_02_01 b) -{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == a.s2.s1.b; } +{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == b.s2.s1.b; } int cmp_struct_02_02 (struct struct_02_02 a, struct struct_02_02 b) { return a.a == b.a && a.b == b.b; } @@ -153,8 +153,8 @@ int cmp_struct_02_04 (struct struct_02_04 a, struct struct_02_04 b) { return a.a == b.a && a.b == b.b; } int cmp_struct_04_01 (struct struct_04_01 a, struct struct_04_01 b) -{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == a.s2.s1.b - && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == a.s2.s1.d; } +{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == b.s2.s1.b + && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == b.s2.s1.d; } int cmp_struct_04_02 (struct struct_04_02 a, struct struct_04_02 b) { return a.a == b.a && a.b == b.b && a.c == b.c && a.d == b.d; } @@ -167,8 +167,8 @@ int cmp_struct_04_04 (struct struct_04_04 a, struct struct_04_04 b) { return a.a == b.a && a.b == b.b && a.c == b.c && a.d == b.d; } int cmp_struct_05_01 (struct struct_05_01 a, struct struct_05_01 b) -{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == a.s2.s1.b - && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == a.s2.s1.d +{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == b.s2.s1.b + && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == b.s2.s1.d && a.s2.s1.e == b.s2.s1.e; } int cmp_struct_05_02 (struct struct_05_02 a, struct struct_05_02 b) @@ -187,7 +187,7 @@ int cmp_struct_05_04 (struct struct_05_04 a, struct struct_05_04 b) int cmp_struct_static_02_01 (struct struct_static_02_01 a, struct struct_static_02_01 b) -{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == a.s2.s1.b; } +{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == b.s2.s1.b; } int cmp_struct_static_02_02 (struct struct_static_02_02 a, @@ -207,8 +207,8 @@ cmp_struct_static_02_04 (struct struct_static_02_04 a, int cmp_struct_static_04_01 (struct struct_static_04_01 a, struct struct_static_04_01 b) -{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == a.s2.s1.b - && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == a.s2.s1.d; } +{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == b.s2.s1.b + && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == b.s2.s1.d; } int cmp_struct_static_04_02 (struct struct_static_04_02 a, @@ -229,8 +229,8 @@ cmp_struct_static_04_04 (struct struct_static_04_04 a, int cmp_struct_static_06_01 (struct struct_static_06_01 a, struct struct_static_06_01 b) -{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == a.s2.s1.b - && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == a.s2.s1.d +{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == b.s2.s1.b + && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == b.s2.s1.d && a.s2.s1.e == b.s2.s1.e && a.f == b.f; } int