[cairo] patch for VxWorks / Wind River Diab Compiler support

Manfred Kogler manfred.kogler at gmail.com
Wed Feb 19 10:24:14 PST 2014


Hi again,

I had a closer look and now realize that _buf is a member of struct
cairo_image_span_renderer_t and on that structure operator sizeof() is
called. So of course the sizeof() topic is an issue.
However, as just noted, we used the pointer version (uint8_t *_buf) for
about one your now without any known issues... we were lucky  :-)

Anyway, to be standard compliant, an array declaration of length 0 shall
not be used:
    => ISO 9899:2011 6.7.6.2: If the expression is a constant expression,
it shall have a value greater than zero.

How about standard-compliance in cairo code in general?

Best regards,
Fred



On Wed, Feb 19, 2014 at 6:27 PM, Manfred Kogler <manfred.kogler at gmail.com>wrote:

> Hi Bill,
>
> ad (4)
>
> Actually, we've used that approach since more than a year and didn't run
> into a problem. However, I just retested and it seems due to a Diab
> compiler update this compile error is gone, so it is not an issue anymore
> for us which declaration is used. Besides, _buf is used only locally and
> not extensively, there is no sizeof() operator used on it.
>
> Best regards,
> Fred
>
>
>
> On Tue, Feb 18, 2014 at 5:53 PM, Bill Spitzak <spitzak at gmail.com> wrote:
>
>> On 02/18/2014 06:51 AM, Manfred Kogler wrote:
>>
>>> (4) error: array declarations of len 0 are not allowed -> replaced with
>>> pointer to array-elem
>>>      see file cairo-image-compositor.c:
>>>          uint8_t _buf[0];
>>>              ->
>>>          uint8_t *_buf;
>>>
>>
>> That certainly will not work. Using [1] is common but requires fixing all
>> the uses of sizeof().
>>
>>
>> --
>> cairo mailing list
>> cairo at cairographics.org
>> http://lists.cairographics.org/mailman/listinfo/cairo
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20140219/8402ba1a/attachment.html>


More information about the cairo mailing list