linux/tools
Anders Roxell 43977b8828 cpupower: remove stringop-truncation waring
commit 8a7e2d2ea0 upstream.

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: 7fe2f6399a ("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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-02-11 17:53:16 +00:00
..
arch/x86/include/asm perf tools: Move syscall number fallbacks from perf-sys.h to tools/arch/x86/include/asm/ 2018-11-20 18:06:03 +00:00
cgroup cgroups: fix cgroup_event_listener error handling 2013-01-08 10:00:44 -08:00
firewire tools/firewire: nosy-dump: check for allocation failure 2012-12-02 20:10:18 +01:00
hv tools: hv: fcopy: set 'error' in case an unknown operation was requested 2018-12-16 22:09:31 +00:00
include tools include: Add a __fallthrough statement 2018-11-20 18:06:05 +00:00
lguest tools/lguest: offer VIRTIO_F_ANY_LAYOUT for net device. 2013-07-15 11:18:32 +09:30
lib tools/lib/lockdep: Reduce MAX_LOCK_DEPTH to avoid overflowing lock_chain/: Depth 2017-10-12 15:27:44 +01:00
net tools/net: Use include/uapi with __EXPORTED_HEADERS__ 2015-12-14 10:17:12 +00:00
nfsd NFSD: Added fault injection script 2011-11-07 21:10:47 -05:00
perf perf tools: Fix python extension build for gcc 8 2018-11-20 18:06:06 +00:00
power cpupower: remove stringop-truncation waring 2019-02-11 17:53:16 +00:00
scripts tools lib traceevent: Add global QUIET_CC_FPIC build output 2013-12-19 16:18:10 -03:00
testing rcutorture/kvm.sh: Use consistent help text for --qemu-args 2018-06-16 22:21:43 +01:00
thermal/tmon tmon: set umask to a reasonable value 2014-07-01 22:00:51 +08:00
usb tools: ffs-test: fix header values endianess 2014-06-30 13:23:58 -05:00
virtio tools: Consolidate types.h 2014-05-01 21:22:39 +02:00
vm tools/vm/slabinfo: fix an unintentional printf 2016-11-20 01:16:57 +00:00
Makefile tools: Add a "make all" rule 2016-01-25 10:43:31 +00:00