From e7c6957f5409a0745441275f982c7a0448bac61b Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 26 Jul 2023 23:32:48 +0200 Subject: [PATCH] battery: avoid a couple warnings on Linux --- src/applets/battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applets/battery.c b/src/applets/battery.c index fb0cd78..a63154a 100644 --- a/src/applets/battery.c +++ b/src/applets/battery.c @@ -371,7 +371,7 @@ static gboolean _battery_get(Battery * battery, gdouble * level, return TRUE; } buf[--buf_cnt] = '\0'; - if(sscanf(buf, "%f %f %x %x %x %x %d%% %d min", &d, &d, &u, &x, &u, + if(sscanf(buf, "%lf %lf %x %x %x %x %d%% %d min", &d, &d, &u, &x, &u, &u, &b, &i) != 8) { error_set("%s: %s: %s", applet.name, apm, strerror(errno));