mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06:14 +01:00
gapplication: Fix a -Wfloat-conversion warning
This introduces no functional changes, but does squash a false positive warning from `-Wfloat-conversion`: ``` ../gio/gapplication.c:462:15: error: implicit conversion turns floating-point number into integer: 'gdouble' (aka 'double') to '_Bool' [-Werror,-Wfloat-conversion] if (*(gdouble *) entry->arg_data) ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ``` Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
e888e7d497
commit
9cb0e9464e
@ -459,7 +459,7 @@ g_application_pack_option_entries (GApplication *application,
|
||||
break;
|
||||
|
||||
case G_OPTION_ARG_DOUBLE:
|
||||
if (*(gdouble *) entry->arg_data)
|
||||
if (*(gdouble *) entry->arg_data != 0.0)
|
||||
value = g_variant_new_double (*(gdouble *) entry->arg_data);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user