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:
Philip Withnall 2024-09-17 23:42:31 +01:00
parent e888e7d497
commit 9cb0e9464e
No known key found for this signature in database
GPG Key ID: DCDF5885B1F3ED73

View File

@ -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;