summaryrefslogtreecommitdiff
path: root/battstat
diff options
context:
space:
mode:
Diffstat (limited to 'battstat')
-rw-r--r--battstat/acpi-freebsd.c1
-rw-r--r--battstat/power-management.c10
2 files changed, 5 insertions, 6 deletions
diff --git a/battstat/acpi-freebsd.c b/battstat/acpi-freebsd.c
index afa66bdb..33010a18 100644
--- a/battstat/acpi-freebsd.c
+++ b/battstat/acpi-freebsd.c
@@ -141,7 +141,6 @@ acpi_freebsd_read(struct apm_info *apminfo, struct acpi_info * acpiinfo)
{
int time;
int life;
- int acline;
int state;
size_t len;
int rate;
diff --git a/battstat/power-management.c b/battstat/power-management.c
index de3ffe09..ca208891 100644
--- a/battstat/power-management.c
+++ b/battstat/power-management.c
@@ -434,12 +434,12 @@ power_management_getinfo( BatteryStatus *status )
const char *
power_management_initialise (void (*callback) (void))
{
- char *err;
#ifdef __linux__
struct stat statbuf;
-#endif
-
+#endif /* __linux__ */
#ifdef HAVE_UPOWER
+ char *err;
+
err = battstat_upower_initialise (callback);
if( err == NULL ) /* UPOWER is up */
@@ -451,8 +451,8 @@ power_management_initialise (void (*callback) (void))
else
/* fallback to legacy methods */
g_free( err );
-#endif
-
+#endif /* HAVE_UPOWER */
+
#ifdef __linux__
if (acpi_linux_init(&acpiinfo)) {