Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Aug 2020 21:17:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        gnome@FreeBSD.org
Subject:   [Bug 248736] devel/json-glib: Fix build with clang 11
Message-ID:  <bug-248736-6497-cTctta9vCL@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-248736-6497@https.bugs.freebsd.org/bugzilla/>
References:  <bug-248736-6497@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248736

--- Comment #2 from Dimitry Andric <dim@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 =3D (GTokenType) value_p->v_symbol;
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is because v_symbol is a pointer and GTokenType is an enum (so int-lik=
e).
Glib provides the GPOINTER_TO_INT macro for this purpose.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248736-6497-cTctta9vCL>