X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/2bd581a47b8e355a398b87bb82fdcff547b8073a..c83b388a3f8f7a8c8d5a5cfddb6ab397005371a1:/components/battery.c?ds=inline diff --git a/components/battery.c b/components/battery.c index e997e4c..49f43e6 100644 --- a/components/battery.c +++ b/components/battery.c @@ -16,8 +16,7 @@ snprintf(path, sizeof(path), "%s%s%s", "/sys/class/power_supply/", bat, "/capacity"); - return (pscanf(path, "%i", &perc) == 1) ? - bprintf("%d", perc) : NULL; + return (pscanf(path, "%i", &perc) == 1) ? bprintf("%d", perc) : NULL; } const char * @@ -29,7 +28,6 @@ } map[] = { { "Charging", "+" }, { "Discharging", "-" }, - { "Full", "=" }, }; size_t i; char path[PATH_MAX], state[12]; @@ -54,7 +52,7 @@ #include const char * - battery_perc(const char *null) + battery_perc(const char *unused) { struct apm_power_info apm_info; int fd; @@ -77,7 +75,7 @@ } const char * - battery_state(const char *bat) + battery_state(const char *unused) { int fd; size_t i;