gdb: fix some clang-tidy readability-misleading-indentation warnings
I have warnings like these showing in my editor all the time, so I thought I'd run clang-tidy with this diagnostic on all the files (that I can compile) and fix them. There is still one warning, in utils.c, but that's because some code is mixed up with preprocessor macros (#ifdef TUI), so I think there no good solution there. Change-Id: I345175fc7dd865318f0fbe61ac026c88c3b6a96b
This commit is contained in:
parent
8d2ef06e1c
commit
492325c4b7
@ -189,7 +189,7 @@ line_is_less_than (const deprecated_dis_line_entry &mle1,
|
||||
{
|
||||
if (mle1.start_pc != mle2.start_pc)
|
||||
val = mle1.start_pc < mle2.start_pc;
|
||||
else
|
||||
else
|
||||
val = mle1.line < mle2.line;
|
||||
}
|
||||
else
|
||||
|
@ -851,7 +851,7 @@ dtrace_static_probe_ops::get_probes
|
||||
if (bfd_malloc_and_get_section (abfd, sect, &dof) && dof != NULL)
|
||||
dtrace_process_dof (sect, objfile, probesp,
|
||||
(struct dtrace_dof_hdr *) dof);
|
||||
else
|
||||
else
|
||||
complaint (_("could not obtain the contents of"
|
||||
"section '%s' in objfile `%s'."),
|
||||
bfd_section_name (sect), bfd_get_filename (abfd));
|
||||
|
@ -2171,7 +2171,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||
fprintf_unfiltered (gdb_stdlog, " (base=%s) [saved]",
|
||||
paddress (gdbarch, cache->base));
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* The prologue has been slowly allocating stack space. Adjust
|
||||
the SP back. */
|
||||
|
@ -2063,7 +2063,7 @@ micromips_next_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||
if (regcache_raw_get_signed (regcache, b0s5_reg (insn >> 16))
|
||||
!= regcache_raw_get_signed (regcache, b5s5_reg (insn >> 16)))
|
||||
pc += micromips_relative_offset16 (insn);
|
||||
else
|
||||
else
|
||||
pc += micromips_pc_insn_size (gdbarch, pc);
|
||||
break;
|
||||
|
||||
|
@ -313,7 +313,7 @@ pascal_language::value_print_inner (struct value *val,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pascal_is_string_type (type, &length_pos, &length_size,
|
||||
if (pascal_is_string_type (type, &length_pos, &length_size,
|
||||
&string_pos, &char_type, NULL) > 0)
|
||||
{
|
||||
len = extract_unsigned_integer (valaddr + length_pos,
|
||||
|
@ -327,8 +327,8 @@ adi_is_addr_mapped (CORE_ADDR vaddr, size_t cnt)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
warning (_("unable to open /proc file '%s'"), filename);
|
||||
else
|
||||
warning (_("unable to open /proc file '%s'"), filename);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -2410,14 +2410,14 @@ tfind_line_command (const char *args, int from_tty)
|
||||
error (_("Cannot find a good line."));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Is there any case in which we get here, and have an address
|
||||
which the user would want to see? If we have debugging
|
||||
symbols and no line numbers? */
|
||||
error (_("Line number %d is out of range for \"%s\"."),
|
||||
sal.line, symtab_to_filename_for_display (sal.symtab));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Is there any case in which we get here, and have an address
|
||||
which the user would want to see? If we have debugging
|
||||
symbols and no line numbers? */
|
||||
error (_("Line number %d is out of range for \"%s\"."),
|
||||
sal.line, symtab_to_filename_for_display (sal.symtab));
|
||||
}
|
||||
|
||||
/* Find within range of stated line. */
|
||||
if (args && *args)
|
||||
|
Loading…
x
Reference in New Issue
Block a user