]> git.baikalelectronics.ru Git - kernel.git/commit
tools/power turbostat: Fix gcc build warnings
authorLen Brown <len.brown@intel.com>
Thu, 19 Mar 2020 22:33:12 +0000 (18:33 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 20 Mar 2020 04:32:27 +0000 (00:32 -0400)
commit4b40c12165275ad37f67318be9a256b60c9ca3dd
tree54f928440f2357d6ea76ab7d225ffb8cb4437429
parent62d6f062d9164ae9ed3efec1f0bed43de88ed400
tools/power turbostat: Fix gcc build warnings

Warning: ‘__builtin_strncpy’ specified bound 20 equals destination size
[-Wstringop-truncation]

reduce param to strncpy, to guarantee that a null byte is always copied
into destination buffer.

Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c