From ea2397b21fcda46dca83dd9571fbd03801190720 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Tue, 16 Jan 2018 10:10:47 +0100 Subject: eee-plugin.c: Fix build warning: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the build warning: eee-plugin.c: In function ‘eee_plugin_get_sensor_value’: eee-plugin.c:92:20: warning: too many arguments for format [-Wformat-extra-args] if (fscanf(fp, "%f", &sensor_value, units) < 1) { ^~~~ --- plugins/eee/eee-plugin.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/eee/eee-plugin.c b/plugins/eee/eee-plugin.c index a1867f1..eadd63a 100644 --- a/plugins/eee/eee-plugin.c +++ b/plugins/eee/eee-plugin.c @@ -82,14 +82,13 @@ static gdouble eee_plugin_get_sensor_value(const gchar *path, FILE *fp; gfloat sensor_value = 0; - gchar units[32]; if (NULL == (fp = fopen(path, "r"))) { g_set_error(error, SENSORS_APPLET_PLUGIN_ERROR, EEE_DEVICE_FILE_OPEN_ERROR, "Error opening sensor device file %s", path); return sensor_value; } - if (fscanf(fp, "%f", &sensor_value, units) < 1) { + if (fscanf(fp, "%f", &sensor_value) < 1) { g_set_error(error, SENSORS_APPLET_PLUGIN_ERROR, EEE_DEVICE_FILE_READ_ERROR, "Error reading from sensor device file %s", path); fclose(fp); return sensor_value; -- cgit v1.2.1