From 2659285bb62c6b5d4d6eed090b086fe297f128b0 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 15 Jan 2020 17:21:47 +0100 Subject: [PATCH] wizard page 120 - temp detect - fix up bsd ifdefs for unused vars --- src/modules/wizard/page_120.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/modules/wizard/page_120.c b/src/modules/wizard/page_120.c index 85a13f560..1c8fbbf1a 100644 --- a/src/modules/wizard/page_120.c +++ b/src/modules/wizard/page_120.c @@ -34,6 +34,8 @@ } */ +#if defined (__FreeBSD__) || defined (__OpenBSD__) +#else static Eina_List * _wizard_temperature_get_bus_files(const char *bus) { @@ -76,6 +78,7 @@ _wizard_temperature_get_bus_files(const char *bus) } return result; } +#endif /* E_API int @@ -93,7 +96,13 @@ wizard_page_shutdown(E_Wizard_Page *pg EINA_UNUSED) E_API int wizard_page_show(E_Wizard_Page *pg EINA_UNUSED) { +#ifdef HAVE_EEZE Eina_List *tempdevs = NULL; +#endif + int hav_temperature = 0; +#if defined (__FreeBSD__) || defined (__OpenBSD__) + // figure out on bsd if we have temp sensors +#else const char *sensor_path[] = { "/proc/omnibook/temperature", "/proc/acpi/thermal_zone", //LINUX_ACPI Directory @@ -104,11 +113,6 @@ wizard_page_show(E_Wizard_Page *pg EINA_UNUSED) "/sys/devices/platform/thinkpad_hwmon/temp1_input", NULL }; - int hav_temperature = 0; - -#if defined (__FreeBSD__) || defined (__OpenBSD__) - // figure out on bsd if we have temp sensors -#else #ifdef HAVE_EEZE tempdevs = eeze_udev_find_by_type(EEZE_UDEV_TYPE_IS_IT_HOT_OR_IS_IT_COLD_SENSOR, NULL);