[cairo] [Patch] Fix warnigns from clang (was: Undefined symbols _cairo_boilerplate_get_target_by_name _cairo_boilerplate_xrealloc _cairo_boilerplate_xmalloc)
Uli Schlachter
psychon at znc.in
Tue May 1 05:55:00 PDT 2012
Hi,
On 13.04.2012 01:42, Ryan Schmidt wrote:
> Some users of cairo in MacPorts are reporting this build failure with cairo 1.12 on OS X Lion using the Xcode clang compiler:
>
>
> Undefined symbols for architecture x86_64:
> "_cairo_boilerplate_get_target_by_name", referenced from:
> _main in cairo_sphinx-sphinx.o
> "_cairo_boilerplate_xrealloc", referenced from:
> _main in cairo_sphinx-sphinx.o
> _recorder in lto.o
> "_cairo_boilerplate_xmalloc", referenced from:
> _main in cairo_sphinx-sphinx.o
> __surface_create in lto.o
> __context_create in lto.o
> _get_surface_size in lto.o
> _recorder in lto.o
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>
>
> The full build log (1.1MB) is here:
>
> https://trac.macports.org/attachment/ticket/33827/main.3.log
Sorry, no idea for this issue.
> As an aside, the log shows over 1500 warnings of the form "implicit conversion from enumeration type ... to different enumeration type",
Most of them are between cairo_status_t and cairo_int_status_t. I guess there
isn't much that we can do about those.
> along with this uninitialized variable warning:
>
>
> cairo-scaled-font-subsets.c:526:33: warning: variable 'sub_font_glyph' is uninitialized when used here [-Wuninitialized]
> _cairo_sub_font_glyph_destroy (sub_font_glyph);
> ^~~~~~~~~~~~~~
> cairo-scaled-font-subsets.c:504:43: note: initialize the variable 'sub_font_glyph' to silence this warning
> cairo_sub_font_glyph_t *sub_font_glyph;
> ^
> = NULL
[...]
Ouch. This is indeed wrong. However, just some dead code, so nothing serious.
Attached are two patches which remove some daed code. I will push them if no one
complains.
Uli
--
"Do you know that books smell like nutmeg or some spice from a foreign land?"
-- Faber in Fahrenheit 451
More information about the cairo
mailing list