<div dir="ltr">Hi all,<br><br>I am using cairo in a VxWorks project using Wind River Diab Compiler on a PPC405 (no HW-floating point support). To get it cleanly compiled, I had to fix a few warnings and errors:<br><br><br>
(1) warning: last enum literal of several enumerations is frequently suffixed with a comma<br> e.g.<br> typedef enum _cairo_backend_type {<br> CAIRO_TYPE_DEFAULT,<br> CAIRO_TYPE_SKIA,<br> } cairo_backend_type_t;<br>
<br> => removed comma after last enum literal<br> <br> typedef enum _cairo_backend_type {<br> CAIRO_TYPE_DEFAULT,<br> CAIRO_TYPE_SKIA<br> } cairo_backend_type_t;<br>
<br><br>(2) error: structure initializations using braced lists must only use non-const initializers<br><br> => introduced define CAIRO_ONLY_CONST_INITIALIZERS_IN_BRACED_LIST:<br> - if not defined (default), compiled code is like in cairo 1.12.16<br>
- if defined (explicitly define for Diab compiler), structure initializations<br> using braced lists that use non-const initialializers are replaced by equivalent<br> initialization statements<br>
<br><br>(3) no-floating-point-optimization / consistency: every call of _cairo_round() is replaced<br> with _cairo_lround()<br> <br> This is because to support no-floating-point-optimization, in header file cairoint.h function<br>
_cairo_lround() is either inlined to _cairo_round() or implemented on its own, depending<br> on define DISABLE_SOME_FLOATING_POINT.<br> <br> Actually a proposal at this point: shouldn't _cairo_round() be removed completely and<br>
instead only _cairo_lround() be used? (This proposal is not considered in my patch!)<br> <br><br>(4) error: array declarations of len 0 are not allowed -> replaced with pointer to array-elem<br> see file cairo-image-compositor.c:<br>
uint8_t _buf[0];<br> -><br> uint8_t *_buf;<br><br><br>The patch I attached is based on cairo 1.12.16 release. I propose to take it into the next release.<br><br>Many thanks and best regards,<br>
Fred<br><br></div>