This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PUSHED OBV] Fixed Fix misleading indentation error.
- From: Stephen Roberts <Stephen dot Roberts at arm dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Tue, 20 Mar 2018 16:39:45 +0000
- Subject: [PUSHED OBV] Fixed Fix misleading indentation error.
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Fixed a build error caused by my previous change, which caused the indentation of the following code block to become incorrect.
I have tested this change using -Werror=misleading-indentation.
Stephen.
gdb/
* symtab.c (find_pc_sect_line): fixed indentation.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 41aaef7..2b1f955 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -3212,17 +3212,17 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
if (item->pc > pc && (!alt || item->pc < alt->pc))
alt = item;
- auto pc_compare = [](const CORE_ADDR & pc,
- const struct linetable_entry & lhs)->bool
- {
- return pc < lhs.pc;
- };
+ auto pc_compare = [](const CORE_ADDR & pc,
+ const struct linetable_entry & lhs)->bool
+ {
+ return pc < lhs.pc;
+ };
- struct linetable_entry *first = item;
- struct linetable_entry *last = item + len;
- item = std::upper_bound (first, last, pc, pc_compare);
- if (item != first)
- prev = item - 1; /* Found a matching item. */
+ struct linetable_entry *first = item;
+ struct linetable_entry *last = item + len;
+ item = std::upper_bound (first, last, pc, pc_compare);
+ if (item != first)
+ prev = item - 1; /* Found a matching item. */
/* At this point, prev points at the line whose start addr is <= pc, and
item points at the next line. If we ran off the end of the linetable
@@ -3245,10 +3245,10 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
}
/* If another line (denoted by ITEM) is in the linetable and its
- PC is after BEST's PC, but before the current BEST_END, then
+ PC is after BEST's PC, but before the current BEST_END, then
use ITEM's PC as the new best_end. */
if (best && item < last && item->pc > best->pc
- && (best_end == 0 || best_end > item->pc))
+ && (best_end == 0 || best_end > item->pc))
best_end = item->pc;
}