[PATCH] dmx: Annotate dmxlog.c with _X_ATTRIBUTE_PRINTF

Michal Suchanek hramrach at gmail.com
Thu Apr 26 06:11:20 PDT 2012


On 26 April 2012 07:20, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> On Mon, Apr 23, 2012 at 07:02:29PM +0200, Michal Suchanek wrote:
>> From c3b73397fce271cefac7a72d5be498aed516dc59 Mon Sep 17 00:00:00 2001
>> From: Michal Suchanek <hramrach at gmail.com>
>> Date: Mon, 23 Apr 2012 15:28:07 +0200
>> Subject: [PATCH] dmx: Annotate dmxlog.c with _X_ATTRIBUTE_PRINTF and
>>  _X_NORETURN
>>
>>   * and fix resulting printf warning in dmxLogVisua
>>
>> Signed-off-by: Michal Suchanek <hramrach at gmail.com>

>>  /** Provide an ErrorF function when used stand-alone. */
>> -void
>> +void _X_ATTRIBUTE_PRINTF(1, 0)
>>  ErrorF(const char *format, ...)
>
> ack to the principle, though it seems the convention is to have the
> attributes after the function name and in the header file. The latter
> doesn't apply for ErrorF here, but others like dmxLogInput and friends
> should be annotated in the header.

Yes, some of the functions are declared in the header and should be
annotated there.

Attaching an updated patch.

Thanks

Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dmx-Annotate-dmxlog.c-with-_X_ATTRIBUTE_PRINTF-and-_.patch
Type: application/octet-stream
Size: 4739 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20120426/86cc043b/attachment.obj>


More information about the xorg-devel mailing list