[gnome-applets/wip/muktupavels/werror] netspeed: fix -Wdouble-promotion warnings



commit 6651962a619e6f9b6268155edd65968a06257a0f
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Apr 4 21:43:53 2020 +0300

    netspeed: fix -Wdouble-promotion warnings

 gnome-applets/netspeed/netspeed-applet.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnome-applets/netspeed/netspeed-applet.c b/gnome-applets/netspeed/netspeed-applet.c
index 098d52fef..211fbf49f 100644
--- a/gnome-applets/netspeed/netspeed-applet.c
+++ b/gnome-applets/netspeed/netspeed-applet.c
@@ -503,7 +503,7 @@ update_applet(NetspeedApplet *applet)
                        char *text;
 
                        quality = applet->devinfo.qual / 100.0f;
-                       if (quality > 1.0)
+                       if (quality > 1.0f)
                                quality = 1.0;
 
                        text = g_strdup_printf ("%d %%", applet->devinfo.qual);
@@ -960,8 +960,8 @@ details_cb (GSimpleAction *action,
                applet->signalbar = gtk_progress_bar_new ();
 
                quality = applet->devinfo.qual / 100.0f;
-               if (quality > 1.0)
-               quality = 1.0;
+               if (quality > 1.0f)
+                       quality = 1.0;
 
                text = g_strdup_printf ("%d %%", applet->devinfo.qual);
                gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (applet->signalbar), quality);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]