This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Add some more casts (1/2)
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Fri, 25 Sep 2015 09:29:34 -0400
- Subject: Re: [PATCH 2/2] Add some more casts (1/2)
- Authentication-results: sourceware.org; auth=none
- References: <1443036644-583-1-git-send-email-simon dot marchi at ericsson dot com> <86fv228wpz dot fsf at gmail dot com>
On 15-09-25 09:17 AM, Yao Qi wrote:
> Simon Marchi <simon.marchi@ericsson.com> writes:
>
>> - const struct signal_catchpoint *c = (void *) bl->owner;
>> + const struct signal_catchpoint *c =
>> + (const struct signal_catchpoint *) bl->owner;
>
> Nit here: "=" should be put the beginning of next line, like
>
> const struct signal_catchpoint *c
> = (const struct signal_catchpoint *) bl->owner;
>
> GNU Coding Standards says "When you split an expression into multiple
> lines, split it before an operator, not after one." There are multiple
> instances of this problem.
>
> OK with them fixed.
I saw that, but didn't know that it applied to the assignment operator
as well. IMO, moving the = to the second line does not improve readability
and potentially causes even more line wrapping. Anyhow, I'll fix those to
conform to GNU Coding Standards.
Thanks!