Remove declaration-after-statement C warning
Arnaud Fontaine
arnaud at andesi.org
Wed Sep 11 22:58:19 PDT 2013
Alan Coopersmith <alan.coopersmith at oracle.com> writes:
> On 09/11/13 08:52 PM, Daniel Stone wrote:
>> Hi,
>>
>> On 11 September 2013 17:31, Mark Kettenis <mark.kettenis at xs4all.nl> wrote:
>>>> From: Alan Coopersmith <alan.coopersmith at oracle.com>
>>>> Pushing the patch is easy - determining if it's our consensus to change
>>>> the X.Org coding style to allow this is the hard part.
>>>>
>>>> Does anyone object to allowing this change to the coding style now that
>>>> it's no longer a hard requirement for OpenBSD's ports?
>>>
>>> It's still bad style.
>>
>> Yeah, I actually totally agree.
Why? I find it really useful, especially for the example given by Alan,
and also to declare variables just before they are used, but for this
point that's probably a matter of taste more than anything else at the
end.
> The one bit I would like to have is declarations in for/while loops, such
> as
> for (int i = 0; i < MAXSCREENS; i++)
>
> Having declarations in the middle of code blocks I can live without, though
> in a few cases it would reduce the complexity of our #ifdef nesting.
+1
--
Arnaud Fontaine
More information about the xorg-devel
mailing list