diff options
author | rbuj <[email protected]> | 2020-07-08 20:49:12 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-07-15 17:59:03 +0200 |
commit | 9d8bc8107d5417e9c1df7ce4146ed4affd5f232a (patch) | |
tree | 26ae1bdc90fb4c922962417f401e72806e07927a | |
parent | f0dce7584fc780bcbb7370dfa4f4403cdea21153 (diff) | |
download | mate-applets-9d8bc8107d5417e9c1df7ce4146ed4affd5f232a.tar.bz2 mate-applets-9d8bc8107d5417e9c1df7ce4146ed4affd5f232a.tar.xz |
Remove unused variable warning reported by cppcheck
-rw-r--r-- | battstat/acpi-freebsd.c | 1 | ||||
-rw-r--r-- | battstat/power-management.c | 10 |
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)) { |