mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-09 15:33:12 +02:00
gscanner: Fix -Wshorten-64-to-32 warning when reading an integer token
There’s already a documented explicit cast here, so let’s add the explicit cast in C to match that. Fixes a `-Wshorten-64-to-32` warning. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3527
This commit is contained in:
parent
45a1c0fdc1
commit
49d8185d03
@ -1694,12 +1694,12 @@ g_scanner_get_token_i (GScanner *scanner,
|
|||||||
* by copying between potentially-overlapping union members. */
|
* by copying between potentially-overlapping union members. */
|
||||||
if (scanner->config->store_int64)
|
if (scanner->config->store_int64)
|
||||||
{
|
{
|
||||||
gint64 temp = value_p->v_int64;
|
guint64 temp = value_p->v_int64;
|
||||||
value_p->v_float = temp;
|
value_p->v_float = temp;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gint temp = value_p->v_int;
|
gulong temp = value_p->v_int;
|
||||||
value_p->v_float = temp;
|
value_p->v_float = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user