diff --git a/build_tools/build_detect_platform b/build_tools/build_detect_platform index 057f77ec531c8971dc3583de64eb4345bb05bba6..7f454bcca086d21dfd1629a0576736619596890d 100755 --- a/build_tools/build_detect_platform +++ b/build_tools/build_detect_platform @@ -397,6 +397,7 @@ EOF #include int main() { size_t res = malloc_usable_size(0); + (void)res; return 0; } EOF @@ -411,6 +412,7 @@ EOF #include int main() { int x = PTHREAD_MUTEX_ADAPTIVE_NP; + (void)x; return 0; } EOF @@ -422,7 +424,7 @@ EOF if ! test $ROCKSDB_DISABLE_BACKTRACE; then # Test whether backtrace is available $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null <> + #include int main() { void* frames[1]; backtrace_symbols(frames, backtrace(frames, 1)); @@ -480,6 +482,7 @@ EOF #include int main() { int cpuid = sched_getcpu(); + (void)cpuid; } EOF if [ "$?" = 0 ]; then @@ -515,7 +518,7 @@ fi if test "$USE_HDFS"; then if test -z "$JAVA_HOME"; then - echo "JAVA_HOME has to be set for HDFS usage." + echo "JAVA_HOME has to be set for HDFS usage." >&2 exit 1 fi HDFS_CCFLAGS="$HDFS_CCFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/linux -DUSE_HDFS -I$HADOOP_HOME/include" @@ -553,12 +556,13 @@ $CXX $PLATFORM_CXXFLAGS $COMMON_FLAGS -x c++ - -o /dev/null 2>/dev/null < int main() { volatile uint32_t x = _mm_crc32_u32(0, 0); + (void)x; } EOF if [ "$?" = 0 ]; then COMMON_FLAGS="$COMMON_FLAGS -DHAVE_SSE42" elif test "$USE_SSE"; then - echo "warning: USE_SSE specified but compiler could not use SSE intrinsics, disabling" + echo "warning: USE_SSE specified but compiler could not use SSE intrinsics, disabling" >&2 exit 1 fi @@ -570,12 +574,13 @@ $CXX $PLATFORM_CXXFLAGS $COMMON_FLAGS -x c++ - -o /dev/null 2>/dev/null <&2 exit 1 fi @@ -589,6 +594,7 @@ if [ "$PLATFORM" != IOS ]; then #endif int main() { static __thread int tls; + (void)tls; } EOF if [ "$?" = 0 ]; then