test/blobfs: rocksdb building error with gcc9

There's a small error when building rocksdb in blobfs db_bench
with gcc9:
"strncpy output truncated before terminating nul copying as many
bytes from a string as its length [-Werror=stringop-truncation]"

It's not a real bug for in the code "strncpy" truncates the null
terminator but set it later, which has been reported here:
https://github.com/facebook/rocksdb/issues/4017
Just adding "-Wno-error=stringop-truncation" to silent the compiler.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I95993605f0376f5c101fb487596721b384319bcb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1594
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Richael Zhuang 2020-03-31 11:13:24 +08:00 committed by Tomasz Zawadzki
parent 87c2ec02e4
commit e9063d4da1

View File

@ -61,7 +61,7 @@ fi
EXTRA_CXXFLAGS=""
GCC_VERSION=$(cc -dumpversion | cut -d. -f1)
if (( GCC_VERSION >= 9 )); then
EXTRA_CXXFLAGS+="-Wno-deprecated-copy -Wno-pessimizing-move"
EXTRA_CXXFLAGS+="-Wno-deprecated-copy -Wno-pessimizing-move -Wno-error=stringop-truncation"
fi
$MAKE db_bench $MAKEFLAGS $MAKECONFIG DEBUG_LEVEL=0 SPDK_DIR=$rootdir EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS"