summaryrefslogtreecommitdiff
path: root/plugins/eee
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-01-16 10:10:47 +0100
committerraveit65 <[email protected]>2018-01-17 10:22:21 +0100
commitea2397b21fcda46dca83dd9571fbd03801190720 (patch)
tree2c381c1c04b23c8a49a21c220bb0c38c7c80fca9 /plugins/eee
parenta9b1c7c0a8a3c40909eec7e4f114715ee7496dfa (diff)
downloadmate-sensors-applet-ea2397b21fcda46dca83dd9571fbd03801190720.tar.bz2
mate-sensors-applet-ea2397b21fcda46dca83dd9571fbd03801190720.tar.xz
eee-plugin.c: Fix build warning:
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) { ^~~~
Diffstat (limited to 'plugins/eee')
-rw-r--r--plugins/eee/eee-plugin.c3
1 files changed, 1 insertions, 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;