From e9063d4da17cc4c47778affac487850f0b313c0d Mon Sep 17 00:00:00 2001 From: Richael Zhuang Date: Tue, 31 Mar 2020 11:13:24 +0800 Subject: [PATCH] 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 Change-Id: I95993605f0376f5c101fb487596721b384319bcb Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1594 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- test/blobfs/rocksdb/rocksdb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/blobfs/rocksdb/rocksdb.sh b/test/blobfs/rocksdb/rocksdb.sh index 6bc5e7a95..d67666bb2 100755 --- a/test/blobfs/rocksdb/rocksdb.sh +++ b/test/blobfs/rocksdb/rocksdb.sh @@ -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"