Remove declaration-after-statement C warning (was: [Xcb] Patch for compiler warnings in util-image)

Arnaud Fontaine arnaud at andesi.org
Wed Aug 28 19:21:03 PDT 2013


Hello,

Cc'ing xorg-devel as -Wdeclaration-after-statement is actually defined
in xorg/util/macros.

Alan Coopersmith <alan.coopersmith at oracle.com> writes:

> On 08/23/13 01:04 AM, Arnaud Fontaine wrote:
>> Good to know, thanks! Does this mean -Wdeclaration-after-statement can
>> be removed from util/macros/xorg-macros.m4.in then? From my
>> understanding, AC_PROG_CC_C99 is already the default, so this should not
>> be an issue to remove this flag, right?
>
> If Xorg decides to update the common coding style to allow these, then
> yes - it's just a style guideline now, no longer a portability issue.

At least X server specifies some mandatory C extensions[0] (from [1]),
including interleaved code and declarations.

I guess this warning can be removed (feel free to correct me if I'm
wrong), so I have attached a patch for util/macros.

Cheers,
-- 
Arnaud Fontaine

[0] http://cgit.freedesktop.org/xorg/xserver/tree/doc/c-extensions
[1] http://www.x.org/wiki/CodingStyle/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Interleaved-C-code-and-declarations-is-no-longer-a-p.patch
Type: text/x-diff
Size: 915 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20130829/bacca673/attachment.patch>


More information about the xorg-devel mailing list