diff options
author | Andrey Kazmin <a.kazmin@partner.samsung.com> | 2019-12-19 14:26:31 +0300 |
---|---|---|
committer | Andrey Kazmin <a.kazmin@partner.samsung.com> | 2019-12-19 14:26:31 +0300 |
commit | b2d515d1062c1e93b071d3819006826969acfb7c (patch) | |
tree | 87f2aefb73cdeeb1fd35fdf53db1b708a760763d | |
parent | 72e20a4805243ae5a6f159235f77bc4c9c420b91 (diff) | |
download | linux-4.9-exynos9110-sandbox/akazmin/tizen_6.0_build.tar.gz linux-4.9-exynos9110-sandbox/akazmin/tizen_6.0_build.tar.bz2 linux-4.9-exynos9110-sandbox/akazmin/tizen_6.0_build.zip |
Fixed -Werror=stringop-truncation in therm_history_initsandbox/akazmin/tizen_6.0_build
There is no reason to keep in string sec_therm_dev_name[i] more than
actual name bytes. So, we could fix this warning by adding '\0'
just after the end of the constant name.
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
-rwxr-xr-x | drivers/hwmon/sec_thermistor_history.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/sec_thermistor_history.c b/drivers/hwmon/sec_thermistor_history.c index f8fb9af44906..2701558d0e14 100755 --- a/drivers/hwmon/sec_thermistor_history.c +++ b/drivers/hwmon/sec_thermistor_history.c @@ -227,7 +227,7 @@ static int therm_history_init(void) pr_info("%s\n", __func__); for (device_num = 0; device_num < MAX_SEC_THERM_DEVICE_NUM; device_num++) { - strncpy(sec_therm_dev_name[device_num], "NULL", 4); + strncpy(sec_therm_dev_name[device_num], "NULL", 5); } debugfs_create_file("therm_history", 0440, NULL, NULL, &therm_history_fops); |