summaryrefslogtreecommitdiff
path: root/plugins/ibm-acpi
diff options
context:
space:
mode:
authorinfo-cppsp <[email protected]>2018-01-23 18:55:45 +0100
committerraveit65 <[email protected]>2018-01-25 10:03:08 +0100
commit826c61d7a97c6dcb4a5136dfc15cc6702515b480 (patch)
treee49da30ea428e4a18aa0243b8bfdd76147749cfb /plugins/ibm-acpi
parentea2397b21fcda46dca83dd9571fbd03801190720 (diff)
downloadmate-sensors-applet-826c61d7a97c6dcb4a5136dfc15cc6702515b480.tar.bz2
mate-sensors-applet-826c61d7a97c6dcb4a5136dfc15cc6702515b480.tar.xz
ibm-acpi.c: Fix build warning:
ibm-acpi-plugin.c: In function ‘ibm_acpi_plugin_get_sensor_value’: ibm-acpi-plugin.c:182:13: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fp, "%*[^\n]"); /* Skip to the End of the Line */ ^ ibm-acpi-plugin.c:183:13: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fp, "%*1[\n]"); /* Skip One Newline */
Diffstat (limited to 'plugins/ibm-acpi')
-rw-r--r--plugins/ibm-acpi/ibm-acpi-plugin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/ibm-acpi/ibm-acpi-plugin.c b/plugins/ibm-acpi/ibm-acpi-plugin.c
index 0f6c8c5..f659278 100644
--- a/plugins/ibm-acpi/ibm-acpi-plugin.c
+++ b/plugins/ibm-acpi/ibm-acpi-plugin.c
@@ -179,9 +179,9 @@ gdouble ibm_acpi_plugin_get_sensor_value(const gchar *path,
break;
case FAN_SENSOR:
- fscanf(fp, "%*[^\n]"); /* Skip to the End of the Line */
- fscanf(fp, "%*1[\n]"); /* Skip One Newline */
- if (fscanf(fp, "speed: %d", &fan_speed) != 1) {
+ /*fscanf(fp, "%*[^\n]");*/ /* Skip to the End of the Line */
+ /*fscanf(fp, "%*1[\n]");*/ /* Skip One Newline */
+ if (fscanf(fp, "%*[^\n]%*1[\n]speed: %d", &fan_speed) != 1) {
g_set_error(error, SENSORS_APPLET_PLUGIN_ERROR, IBM_ACPI_FILE_READ_ERROR, "Error reading from sensor device file %s", path);
fclose(fp);
return -1.0;