From 48039e8c9350c9e55d3d939d430dd4f9dfd288c5 Mon Sep 17 00:00:00 2001 From: hwspeedy Date: Thu, 14 Mar 2024 13:25:09 +0100 Subject: FIX GCC warnings and 3 potential crash never seen --- modules/devices/battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/devices/battery.c') diff --git a/modules/devices/battery.c b/modules/devices/battery.c index e356c14a..784a6cc5 100644 --- a/modules/devices/battery.c +++ b/modules/devices/battery.c @@ -312,7 +312,7 @@ __scan_battery_apm(void) if ((procapm = fopen("/proc/apm", "r"))) { int old_percentage = percentage; - (void)fscanf(procapm, "%s %s %s 0x%x %s %s %d%%", + int c=fscanf(procapm, "%s %s %s 0x%x %s %s %d%%", apm_drv_ver, apm_bios_ver, trash, &ac_bat, trash, trash, &percentage); fclose(procapm); -- cgit v1.2.3