[cairo] Warnings on Win32

Adrian Johnson ajohnson at redneon.com
Fri Mar 14 02:25:33 PDT 2008


Bobby Salazar wrote:
> This change will fix the warning:
> 
> static inline uint32_t
> cpu_to_be32(uint32_t v)
> {
>     return (v << 16) | (v >> 16);
> }

This change is not correct. This function is required to reverse the
four bytes in a 32-bit word. eg

  abcd => dcba

Your code would change this to:

  abcd => cdab

> Also, in case anyone cares, here are the other 78 warnings I get on MSVC++ 6.0 (after fixing the function above):

You can add a #pragma to disable these warnings. eg

  #pragma warning( disable : 4244 4146 4101 4761 )


More information about the cairo mailing list