From 0880c1722dc0d836ba504f25fbd183c292c687d9 Mon Sep 17 00:00:00 2001 From: Nikos Ntarmos Date: Fri, 15 May 2009 01:39:54 +0300 Subject: [PATCH] Remove unused variables and rearrange includes. Signed-off-by: Brenden Matthews --- src/freebsd.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/freebsd.c b/src/freebsd.c index 01dd6494..b170a679 100644 --- a/src/freebsd.c +++ b/src/freebsd.c @@ -24,6 +24,7 @@ * */ +#include #include #include #include @@ -32,7 +33,6 @@ #include #include #include -#include #include #include @@ -395,8 +395,6 @@ static void get_battery_stats(int *battime, int *batcapacity, int *batstate, int void get_battery_stuff(char *buf, unsigned int n, const char *bat, int item) { int battime, batcapacity, batstate, ac; - char battery_status[64]; - char battery_time[64]; get_battery_stats(&battime, &batcapacity, &batstate, &ac); @@ -439,7 +437,7 @@ static int check_bat(const char *bat) } if (!bat || (batnum = strtol(bat, &endptr, 10)) < 0 || bat == endptr || batnum > numbatts) { - fprintf(stderr, "Wrong battery unit requested\n", bat); + fprintf(stderr, "Wrong battery unit %s requested\n", bat ? bat : ""); return -1; } return batnum; @@ -448,7 +446,7 @@ static int check_bat(const char *bat) int get_battery_perct(const char *bat) { union acpi_battery_ioctl_arg battio; - int batnum, numbatts, acpifd; + int batnum, acpifd; int designcap, lastfulcap, batperct; if ((battio.unit = batnum = check_bat(bat)) < 0)