linux/drivers/iio/common
Nathan Chancellor 6f9ca1d3eb iio: common: ssp_sensors: Initialize calculated_time in ssp_common_process_data
When building with -Wsometimes-uninitialized, Clang warns:

drivers/iio/common/ssp_sensors/ssp_iio.c:95:6: warning: variable
'calculated_time' is used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]

While it isn't wrong, this will never be a problem because
iio_push_to_buffers_with_timestamp only uses calculated_time
on the same condition that it is assigned (when scan_timestamp
is not zero). While iio_push_to_buffers_with_timestamp is marked
as inline, Clang does inlining in the optimization stage, which
happens after the semantic analysis phase (plus inline is merely
a hint to the compiler).

Fix this by just zero initializing calculated_time.

Link: https://github.com/ClangBuiltLinux/linux/issues/394
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04 20:19:56 +01:00
..
cros_ec_sensors iio: common: cros_ec_sensors: simplify getting .drvdata 2018-04-28 16:17:59 +01:00
hid-sensors iio: hid-sensor-hub: clean up indentation, remove extraneous tab 2018-11-25 14:03:59 +00:00
ms_sensors iio: common: ms_sensors: Remove unnecessary cast on void pointer 2017-04-02 09:47:57 +01:00
ssp_sensors iio: common: ssp_sensors: Initialize calculated_time in ssp_common_process_data 2019-04-04 20:19:56 +01:00
st_sensors iio: st_sensors: miscellaneous cleanup 2018-10-21 15:33:36 +01:00
Kconfig iio: cros_ec_sensors_core: Add common functions for the ChromeOS EC Sensor Hub. 2016-10-25 18:20:05 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00