summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-05-09 09:50:10 +0200
committerAleksander Morgado <aleksander@aleksander.es>2020-05-09 10:18:59 +0200
commit5093f3a167c74273a81da4adbcf298c4f5af4e02 (patch)
tree84f0a8d451d035cdb0af518e2c8e56a0732df248
parent2c1dada695b6c9c7e81cdcff535096724e246cfd (diff)
qmicli,loc: fix printing sensor data usage
qmicli-loc.c: In function 'position_report_received': qmicli-loc.c:563:84: error: implicit conversion from 'QmiLocSensorDataUsage' to 'QmiLocReliability' [-Werror=enum-conversion] 563 | g_print (" sensor data usage: %s\n", qmi_loc_reliability_get_string (sensor_data_usage)); | ^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors (cherry picked from commit f44a09b3fd25df0c6131ff47a08a9d865ec5aa0d)
-rw-r--r--src/qmicli/qmicli-loc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qmicli/qmicli-loc.c b/src/qmicli/qmicli-loc.c
index eeaeb79..149e70b 100644
--- a/src/qmicli/qmicli-loc.c
+++ b/src/qmicli/qmicli-loc.c
@@ -488,9 +488,12 @@ position_report_received (QmiClientLoc *client,
else
g_print (" time source: n/a\n");
- if (qmi_indication_loc_position_report_output_get_sensor_data_usage (output, &sensor_data_usage, NULL))
- g_print (" sensor data usage: %s\n", qmi_loc_reliability_get_string (sensor_data_usage));
- else
+ if (qmi_indication_loc_position_report_output_get_sensor_data_usage (output, &sensor_data_usage, NULL)) {
+ g_autofree gchar *sensor_data_usage_str = NULL;
+
+ sensor_data_usage_str = qmi_loc_sensor_data_usage_build_string_from_mask (sensor_data_usage);
+ g_print (" sensor data usage: %s\n", sensor_data_usage_str);
+ } else
g_print (" sensor data usage: n/a\n");
if (qmi_indication_loc_position_report_output_get_session_fix_count (output, &aux32, NULL))