From 826c61d7a97c6dcb4a5136dfc15cc6702515b480 Mon Sep 17 00:00:00 2001 From: info-cppsp Date: Tue, 23 Jan 2018 18:55:45 +0100 Subject: ibm-acpi.c: Fix build warning: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 */ --- plugins/ibm-acpi/ibm-acpi-plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/ibm-acpi') 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; -- cgit v1.2.1