diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2018-06-10 22:33:37 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2018-06-10 22:34:08 -0400 |
commit | 71b73764977a3895b0dda3e7260eece7a8d3e60c (patch) | |
tree | fe1e3260dd69797ea2ff4765054b0b00e00844fb | |
parent | 65a68903e2294fcd1a5496a4fe467a5b28dc0f27 (diff) | |
download | gdb-71b73764977a3895b0dda3e7260eece7a8d3e60c.zip gdb-71b73764977a3895b0dda3e7260eece7a8d3e60c.tar.gz gdb-71b73764977a3895b0dda3e7260eece7a8d3e60c.tar.bz2 |
Remove more "struct" keywords in range-based for loops
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.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 2 | ||||
-rw-r--r-- | gdb/serial.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0e5c068..feef6a4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-06-10 Simon Marchi <simon.marchi@polymtl.ca> + + * dwarf2read.c (process_cu_includes): Remove struct keyword. + * serial.c (serial_interface_lookup): Remove struct keyword. + 2018-06-10 Tom Tromey <tom@tromey.com> * procfs.c (procfs_target::xfer_partial): Use "beneath" as a diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 7f18579..81e1cfb 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 16308ab..0239fc8 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; |