diff options
author | Stewart Smith <stewart@linux.ibm.com> | 2019-03-18 12:41:52 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-03-20 14:27:08 +1100 |
commit | 043e85bf74774c9652c53c4d36dd7c7a3dffcd29 (patch) | |
tree | f6e4a420066087c26944c0a459ccdd908d1c29dc /opal-ci | |
parent | 14a78d5c2e857fc52bd367584e0da4bd39a21ff8 (diff) | |
download | skiboot-043e85bf74774c9652c53c4d36dd7c7a3dffcd29.zip skiboot-043e85bf74774c9652c53c4d36dd7c7a3dffcd29.tar.gz skiboot-043e85bf74774c9652c53c4d36dd7c7a3dffcd29.tar.bz2 |
hw/ipmi/test/run-fru: Fix string truncation warning, enhance test
We've been getting this warning/error from recent GCC:
In file included from hw/ipmi/test/run-fru.c:22:
hw/ipmi/test/../ipmi-fru.c: In function ‘fru_add’:
hw/ipmi/test/../ipmi-fru.c:162:3: warning: ‘strncpy’ output truncated copying 32 bytes from a string of length 38 [-Wstringop-truncation]
strncpy(info.version, version, MAX_STR_LEN + 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This patch does two things:
1) Re-arrange some code to shut GCC up.
2) Add extra fu to tests to ensure we're producing correct bytes.
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Tested-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'opal-ci')
0 files changed, 0 insertions, 0 deletions