This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- Cc: gdb-patches at sourceware dot org, Yao Qi <qiyaoltc at gmail dot com>, "Metzger\, Markus T" <markus dot t dot metzger at intel dot com>
- Date: Thu, 17 Mar 2016 13:50:56 +0100
- Subject: Re: [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2
- Authentication-results: sourceware.org; auth=none
- References: <1458154517-25441-1-git-send-email-arnez at linux dot vnet dot ibm dot com> <1458154517-25441-2-git-send-email-arnez at linux dot vnet dot ibm dot com> <56E9C0C5 dot 4090107 at 0x04 dot net>
On Wed, Mar 16 2016, Marcin KoÅcielnicki wrote:
> On 16/03/16 19:54, Andreas Arnez wrote:
>> This patch added handling for some syscalls to linux-record.c:
>>
>> https://sourceware.org/ml/gdb-patches/2015-10/msg00452.html
>>
>> But for both `pipe' and `pipe2' the patch lacks a statement after an
>> `if', such that the following `break' is interpreted as the `if'-body
>> instead.
>>
>> This adds the missing (return-) statements for the conditionals.
>
> Whoops, my bad. This looks like obvious patch material. Though I
> wonder why it wasn't detected earlier by someone running GCC 6 with
> its -Wmisleading-indentation warning - does it not catch it?
Right, it doesn't catch it (yet):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66298
> Btw, it seems that cases gdb_sys_pipe2 and gdb_sys_pipe could be
> squashed into one.
Right, and a few other cases could be squashed as well. Mabye I'll post
another patch for that...
--
Andreas