From patchwork Mon Jun 11 02:36:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 27731 Received: (qmail 103681 invoked by alias); 11 Jun 2018 02:36:33 -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 103339 invoked by uid 89); 11 Jun 2018 02:36:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy= X-HELO: barracuda.ebox.ca Received: from barracuda.ebox.ca (HELO barracuda.ebox.ca) (96.127.255.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Jun 2018 02:36:31 +0000 X-ASG-Debug-ID: 1528684581-0c856e7f58245f40001-fS2M51 Received: from smtp.ebox.ca (smtp.electronicbox.net [96.127.255.82]) by barracuda.ebox.ca with ESMTP id wrgAEDLyWj9VWi92 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 10 Jun 2018 22:36:21 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.lan (unknown [192.222.164.54]) by smtp.ebox.ca (Postfix) with ESMTP id 162B7441B21; Sun, 10 Jun 2018 22:36:21 -0400 (EDT) From: Simon Marchi X-Barracuda-Effective-Source-IP: 192-222-164-54.qc.cable.ebox.net[192.222.164.54] X-Barracuda-Apparent-Source-IP: 192.222.164.54 X-Barracuda-RBL-IP: 192.222.164.54 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [pushed] Remove more "struct" keywords in range-based for loops Date: Sun, 10 Jun 2018 22:36:20 -0400 X-ASG-Orig-Subj: [pushed] Remove more "struct" keywords in range-based for loops Message-Id: <20180611023620.8667-1-simon.marchi@polymtl.ca> X-Barracuda-Connect: smtp.electronicbox.net[96.127.255.82] X-Barracuda-Start-Time: 1528684581 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 2204 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests=BSF_RULE_7582B X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.51855 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE_7582B Custom Rule 7582B X-IsSubscribed: yes GCC 6.3.0 produces this kind of errors: CXX dwarf2read.o /home/simark/src/binutils-gdb/gdb/dwarf2read.c: In function 'void process_cu_includes(dwarf2_per_objfile*)': /home/simark/src/binutils-gdb/gdb/dwarf2read.c:10220:8: error: types may not be defined in a for-range-declaration [-Werror] for (struct dwarf2_per_cu_data *iter : dwarf2_per_objfile->just_read_cus) ^~~~~~ Removing the struct keyword makes it happy. gdb/ChangeLog: * dwarf2read.c (process_cu_includes): Remove struct keyword. * serial.c (serial_interface_lookup): Remove struct keyword. --- gdb/ChangeLog | 5 +++++ gdb/dwarf2read.c | 2 +- gdb/serial.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0e5c0685cc29..feef6a411266 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-06-10 Simon Marchi + + * dwarf2read.c (process_cu_includes): Remove struct keyword. + * serial.c (serial_interface_lookup): Remove struct keyword. + 2018-06-10 Tom Tromey * procfs.c (procfs_target::xfer_partial): Use "beneath" as a diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 7f1857930b1d..81e1cfb909fc 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -10217,7 +10217,7 @@ compute_compunit_symtab_includes (struct dwarf2_per_cu_data *per_cu) static void process_cu_includes (struct dwarf2_per_objfile *dwarf2_per_objfile) { - for (struct dwarf2_per_cu_data *iter : dwarf2_per_objfile->just_read_cus) + for (dwarf2_per_cu_data *iter : dwarf2_per_objfile->just_read_cus) { if (! iter->is_debug_types) compute_compunit_symtab_includes (iter); diff --git a/gdb/serial.c b/gdb/serial.c index 16308ab9c72d..0239fc833712 100644 --- a/gdb/serial.c +++ b/gdb/serial.c @@ -143,7 +143,7 @@ serial_log_command (struct target_ops *self, const char *cmd) static const struct serial_ops * serial_interface_lookup (const char *name) { - for (const struct serial_ops *ops : serial_ops_list) + for (const serial_ops *ops : serial_ops_list) if (strcmp (name, ops->name) == 0) return ops;