mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-01 17:02:18 +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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user