From 5836099ad73a2d32a12279fa21b31dd72b55fe68 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Tue, 12 Apr 2022 18:12:57 +0200 Subject: [PATCH] freebsd: Fix a few minor warnings --- src/freebsd/up-device-supply.c | 3 +-- src/freebsd/up-util.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/freebsd/up-device-supply.c b/src/freebsd/up-device-supply.c index 0400d6b..967343f 100644 --- a/src/freebsd/up-device-supply.c +++ b/src/freebsd/up-device-supply.c @@ -331,9 +331,9 @@ end: static gboolean up_device_supply_acline_set_properties (UpDevice *device) { +#ifndef UPOWER_CI_DISABLE_PLATFORM_CODE int acstate; -#ifndef UPOWER_CI_DISABLE_PLATFORM_CODE if (up_get_int_sysctl (&acstate, NULL, "hw.acpi.acline")) { g_object_set (device, "online", acstate ? TRUE : FALSE, NULL); return TRUE; @@ -480,7 +480,6 @@ up_device_supply_init (UpDeviceSupply *supply) static void up_device_supply_class_init (UpDeviceSupplyClass *klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); UpDeviceClass *device_class = UP_DEVICE_CLASS (klass); device_class->get_on_battery = up_device_supply_get_on_battery; diff --git a/src/freebsd/up-util.c b/src/freebsd/up-util.c index 18efc12..53007ac 100644 --- a/src/freebsd/up-util.c +++ b/src/freebsd/up-util.c @@ -80,7 +80,6 @@ up_get_int_sysctl (int *value, GError **err, const gchar *format, ...) g_free (name); return status; #else - *value = NULL; return FALSE; #endif }