From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id EAB83387085A for ; Mon, 20 Apr 2020 14:08:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EAB83387085A Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-371--OPnhRNvOdyPZsTaqnbNbw-1; Mon, 20 Apr 2020 10:08:07 -0400 X-MC-Unique: -OPnhRNvOdyPZsTaqnbNbw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3C0D0801A05 for ; Mon, 20 Apr 2020 14:08:06 +0000 (UTC) Received: from blade.nx (ovpn-115-177.ams2.redhat.com [10.36.115.177]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0ACDCA188D for ; Mon, 20 Apr 2020 14:08:06 +0000 (UTC) Received: from blade.com (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id 486AC816CCA9 for ; Mon, 20 Apr 2020 15:08:05 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [OB PATCH] Fix compilation error with clang in gdb/testsuite/gdb.trace/tspeed.c Date: Mon, 20 Apr 2020 15:08:04 +0100 Message-Id: <1587391684-8650-1-git-send-email-gbenson@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-28.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 14:08:10 -0000 Clang fails to compile the above file, with the following error: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] This prevents the following testcase from executing: gdb.trace/tspeed.exp --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.trace/tspeed.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.trace/tspeed.c b/gdb/testsuite/gdb.trace/tsp= eed.c index b2c26bb..39a6646 100644 --- a/gdb/testsuite/gdb.trace/tspeed.c +++ b/gdb/testsuite/gdb.trace/tspeed.c @@ -75,7 +75,7 @@ =20 /* Keep trying the speed test, with more iterations, until =09 we get to a reasonable number. */ - while (problem =3D trace_speed_test()) + while ((problem =3D trace_speed_test())) =09{ =09 /* If iteration isn't working, give up. */ =09 if (iters > max_iters) --=20 1.8.3.1