Remove declaration-after-statement C warning

Alan Coopersmith alan.coopersmith at oracle.com
Wed Sep 11 20:57:41 PDT 2013


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.

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.

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list