Bug 2299 - gcc4 compile warnings
Summary: gcc4 compile warnings
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 0.9.3
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-17 12:08 UTC by ellson
Modified: 2005-08-22 00:15 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
remove const qualifiers from cairo_wideint.[ch] (2.15 KB, patch)
2005-01-17 12:15 UTC, ellson
Details | Splinter Review

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.