diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2018-08-28 11:31:18 +0200 |
---|---|---|
committer | Shuah Khan (Samsung OSG) <shuah@kernel.org> | 2018-08-28 15:46:12 -0600 |
commit | 8a7e2d2ea080d10a189a1d611344b0330468ebc3 (patch) | |
tree | f0346385656974af03207e63c00b0a58e0331031 /tools/power/cpupower/utils/helpers/amd.c | |
parent | 5b394b2ddf0347bef56e50c69a58773c94343ff3 (diff) |
cpupower: remove stringop-truncation waring
The strncpy doesn't null terminate the string because the size is too
short by one byte.
parse.c: In function ‘prepare_default_config’:
parse.c:148:2: warning: ‘strncpy’ output truncated before terminating
nul copying 8 bytes from a string of the same length
[-Wstringop-truncation]
strncpy(config->governor, "ondemand", 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The normal method of passing the length of the destination buffer works
correctly here.
Fixes: 7fe2f6399a84 ("cpupowerutils - cpufrequtils extended with quite some features")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Diffstat (limited to 'tools/power/cpupower/utils/helpers/amd.c')
0 files changed, 0 insertions, 0 deletions