Bug 30612

Summary: cairo fails to compile with sun studio c
Product: cairo Reporter: Daniel Vergien <daniel.vergien>
Component: xcb backendAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.10.0   
Hardware: Other   
OS: Solaris   
Whiteboard:
i915 platform: i915 features:
Attachments: Could-be fix

Description Daniel Vergien 2010-10-05 01:27:08 UTC
Cairo fails to compile with sun studio c with these error:
  CC     cairo-xcb-surface.lo
"cairo-xcb-private.h", line 220: warning: enumerator value overflows INT_MAX (2147483647)
"cairo-xcb-surface.c", line 585: void function cannot return value
cc: acomp failed for cairo-xcb-surface.c
*** Error code 1

This can be fixed by adding "-features=extensions" to the CFLAGS if sun studio compiler is used.
Comment 1 Andrea Canciani 2010-10-05 01:41:57 UTC
Created attachment 39168 [details] [review]
Could-be fix

Can you test the attachment to check if it fixes your problem?
Comment 2 Daniel Vergien 2010-10-05 02:00:28 UTC
The patch fixes the problem
Comment 3 Andrea Canciani 2010-10-05 02:11:23 UTC
Fixed in:

commit f20814e07e7032c14f273d712f35e19addfdae80
Author: Andrea Canciani <ranma42@gmail.com>
Date:   Tue Oct 5 10:36:38 2010 +0200

    xcb: Do not return value in void function
    
    Sun Studio Compiler complains:
    "cairo-xcb-surface.c", line 585: void function cannot return value
    even if the returned value is void.
    Some minor code restructuring removes the issue.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.