[cairo] patch for VxWorks / Wind River Diab Compiler support
manfred.kogler at gmail.com
Wed Feb 19 10:24:14 PST 2014
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 22.214.171.124: If the expression is a constant expression,
it shall have a value greater than zero.
How about standard-compliance in cairo code in general?
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,
> 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;
>>> uint8_t *_buf;
>> That certainly will not work. Using  is common but requires fixing all
>> the uses of sizeof().
>> cairo mailing list
>> cairo at cairographics.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo