From 6148063f860bf23d970199fd74a9efdf547be834 Mon Sep 17 00:00:00 2001 From: zhuyaliang <15132211195@163.com> Date: Sat, 22 Apr 2023 12:56:21 +0800 Subject: Fix Compilation Warning --- plugins/libsensors/libsensors-plugin.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'plugins/libsensors/libsensors-plugin.c') diff --git a/plugins/libsensors/libsensors-plugin.c b/plugins/libsensors/libsensors-plugin.c index b95b888..ebe8b02 100644 --- a/plugins/libsensors/libsensors-plugin.c +++ b/plugins/libsensors/libsensors-plugin.c @@ -230,11 +230,11 @@ static void check_sensor_with_data(GList **sensors, static GList *libsensors_plugin_get_sensors(void) { const sensors_chip_name *chip_name; - int i; GList *sensors = NULL; #if SENSORS_API_VERSION < 0x400 FILE *file; + int i; g_debug("%s: using libsensors version < 4", __FUNCTION__); /* try to open config file, otherwise try alternate config @@ -281,7 +281,6 @@ static GList *libsensors_plugin_get_sensors(void) { return sensors; } - i = 0; while ((chip_name = sensors_get_detected_chips(NULL, &nr))) { char *chip_name_string, *label; -- cgit v1.2.1