Commit e9063d4d authored by Richael Zhuang's avatar Richael Zhuang Committed by Tomasz Zawadzki
Browse files

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: default avatarRichael Zhuang <richael.zhuang@arm.com>
Change-Id: I95993605f0376f5c101fb487596721b384319bcb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1594


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 87c2ec02
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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"