diff options
author | Mark Wielaard <mjw@redhat.com> | 2016-01-25 20:29:54 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2016-01-26 00:04:55 +0100 |
commit | a579cd9aa8c57c8a54833f26452a1afef38e5d20 (patch) | |
tree | c4644afae5892aef7114768ef5bdf2d0ae5e19cb /gdb/linux-record.c | |
parent | 00acd688caf385f38493ebd8d0a7b5f94d501a79 (diff) |
Fix GCC6 -Wmisleading-indentation issues.
GCC6 will warn about misleading indentation issues like:
gdb/ada-lang.c: In function ‘ada_evaluate_subexp’:
ada-lang.c:11423:9: error: statement is indented as if it were guarded by...
arg1 = unwrap_value (arg1);
^~~~
gdb/ada-lang.c:11421:7: note: ...this ‘else’ clause, but it is not
else
^~~~
In this case it would be a bug except for the fact the if clause already
returned early. So this misindented statement really only got executed
for the else case. But it could easily mislead a reader, so adding a
proper else block is the correct solution.
In case of c-typeprint.c (c_type_print_base) the if statement is indeed
misleadingly indented, but not a bug. Just indent correctly. The inflow.c
(terminal_ours_1) misindented block comes from the removal of an if clause
in commit d9d2d8b which looks correct. Just introduce an else to fixup the
indentation of the block. The linux-record.c misleadingly indented return
statements are just that. Misleading to the reader, but not actual bugs.
Just unindent them so they don't look like they fall under the wrong if
clause.
Diffstat (limited to 'gdb/linux-record.c')
-rw-r--r-- | gdb/linux-record.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/linux-record.c b/gdb/linux-record.c index b9e49f3599..29e299d4eb 100644 --- a/gdb/linux-record.c +++ b/gdb/linux-record.c @@ -112,7 +112,7 @@ record_linux_sockaddr (struct regcache *regcache, "memory at addr = 0x%s len = %d.\n", phex_nz (len, tdep->size_pointer), tdep->size_int); - return -1; + return -1; } addrlen = (int) extract_unsigned_integer (a, tdep->size_int, byte_order); if (addrlen <= 0 || addrlen > tdep->size_sockaddr) @@ -150,7 +150,7 @@ record_linux_msghdr (struct regcache *regcache, "len = %d.\n", phex_nz (addr, tdep->size_pointer), tdep->size_msghdr); - return -1; + return -1; } /* msg_name msg_namelen */ @@ -188,7 +188,7 @@ record_linux_msghdr (struct regcache *regcache, "len = %d.\n", phex_nz (addr,tdep->size_pointer), tdep->size_iovec); - return -1; + return -1; } tmpaddr = (CORE_ADDR) extract_unsigned_integer (iov, tdep->size_pointer, @@ -983,7 +983,7 @@ Do you want to stop the program?"), "memory at addr = 0x%s len = %d.\n", OUTPUT_REG (tmpulongest, tdep->arg2), tdep->size_ulong); - return -1; + return -1; } tmpulongest = extract_unsigned_integer (a, tdep->size_ulong, byte_order); |