Bug 2299

Summary: gcc4 compile warnings
Product: cairo Reporter: ellson
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high CC: jwatt
Version: 0.9.3   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: remove const qualifiers from cairo_wideint.[ch]

Description ellson 2005-01-17 12:08:45 UTC
gcc4 generates lots of warnings like:

cairo_wideint.h:159: warning: type qualifiers ignored on function return type


Researching this for a similar bug on another project found:

  In ISO C, type qualifiers on the return type of a function are
  generally allowed but have no effect since the value returned by a
  function is not an lvalue (and can't be accessed after the next
  sequence point, so restrict qualifiers don't come into play).  Since
  such qualifiers won't have whatever effect a programmer might have
  intended, this patch adds a warning for them at -W (except for the
  "volatile void" GNU extension, which gets warned about at -pedantic).

Ref: http://gcc.gnu.org/ml/gcc-patches/2000-10/msg00814.html


I'll followup with patches to cairo_wideint.[ch] to remove the offending "const"
qualifiers.
Comment 1 ellson 2005-01-17 12:15:50 UTC
Created attachment 1695 [details] [review]
remove const qualifiers from cairo_wideint.[ch]
Comment 2 Carl Worth 2005-01-19 07:12:28 UTC
I've committed the above patch to cairo_wideint.c, and my own fix for
cairo_wideint.h. Let me know if I missed anything.
Comment 3 Carl Worth 2005-08-22 17:15:19 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.

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.