[cairo-bugs] [Bug 73193] New: False positive warnings with gcc's -Wundef
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Dec 31 11:51:58 PST 2013
https://bugs.freedesktop.org/show_bug.cgi?id=73193
Priority: medium
Bug ID: 73193
Assignee: chris at chris-wilson.co.uk
Summary: False positive warnings with gcc's -Wundef
QA Contact: cairo-bugs at cairographics.org
Severity: normal
Classification: Unclassified
OS: All
Reporter: self at brendanlong.com
Hardware: Other
Status: NEW
Version: unspecified
Component: general
Product: cairo
Created attachment 91377
--> https://bugs.freedesktop.org/attachment.cgi?id=91377&action=edit
Patch to set disabled feature macros to 0 instead of undefined
I'm trying to clean out gcc warnings in WebKitGTK, and running into this one:
In file included from
../../Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp:42:0:
/usr/include/cairo/cairo-gl.h:113:5: error: "CAIRO_HAS_WGL_FUNCTIONS" is not
defined [-Werror=undef]
#if CAIRO_HAS_WGL_FUNCTIONS
Theoretically, gcc shouldn't be complaining about this because Cairo is a
system library, but it does, and I can't figure out why (the -I lines are from
pkg-config so I can't easily fix them). The easiest solution seems to be to fix
this in Cairo.
The attached patch defines all undefined feature flags to 0. I tried to keep
the semantics exactly the same, and as similar as possible to the original
output, so if that's not necessarily I could simply if it more:
* The current version has lines like this:
/*#undef CAIRO_HAS_WGL_FUNCTIONS */
I assume this so users can `#define CAIRO_HAS_WGL_FUNCTIONS 1` and override
the default. To have the same semantics, I wrapped by definitions in `#ifndef`
checks.
* There's a fairly complex `for` loop to keep the disabled features list
sorted (since sorting the entire output would put the #defines first, then the
#endifs, then the #ifndefs..).
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20131231/c95765e9/attachment.html>
More information about the cairo-bugs
mailing list