[Bug 248736] devel/json-glib: Fix build with clang 11
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Aug 18 21:16:44 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248736
Dimitry Andric <dim at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|devel/json-glib: Fix build |devel/json-glib: Fix build
|with -fno-common (clang 11 |with clang 11
|and gcc 10) |
--- Comment #1 from Dimitry Andric <dim at FreeBSD.org> ---
Sorry, the summary and description were not correct. In case of json-glib, it
was a new clang 11 -Werror warning:
../json-glib/json-scanner.c:928:13: error: cast to smaller integer type
'GTokenType' from 'gpointer' (aka 'void *')
[-Werror,-Wvoid-pointer-to-enum-cast]
*token_p = (GTokenType) value_p->v_symbol;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is because v_symbol is a pointer and GTokenType is an enum (so int-like).
Glib provides the GPOINTER_TO_INT macro for this purpose.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-gnome
mailing list