From: Brian Aker Date: Tue, 12 Feb 2013 05:44:21 +0000 (-0500) Subject: Update for new warnings. X-Git-Tag: 1.0.17~6^2~8 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=599f5fe51b935465234e8085e549915d9b131fd1;p=m6w6%2Flibmemcached Update for new warnings. --- diff --git a/libhashkit/md5.cc b/libhashkit/md5.cc index 71069dbd..cf68e3ca 100644 --- a/libhashkit/md5.cc +++ b/libhashkit/md5.cc @@ -71,6 +71,8 @@ documentation and/or software. #include #include +#pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations" + /* POINTER defines a generic pointer type */ typedef unsigned char *POINTER; typedef const unsigned char *CONST_POINTER; diff --git a/libmemcached/csl/parser.yy b/libmemcached/csl/parser.yy index 3ee3940f..dd9c720b 100644 --- a/libmemcached/csl/parser.yy +++ b/libmemcached/csl/parser.yy @@ -66,13 +66,14 @@ class Context; #include #ifndef __INTEL_COMPILER -#pragma GCC diagnostic ignored "-Wold-style-cast" +# pragma GCC diagnostic ignored "-Wold-style-cast" #endif #ifndef __INTEL_COMPILER -#ifndef __clang__ -#pragma GCC diagnostic ignored "-Wlogical-op" -#endif +# ifndef __clang__ +# pragma GCC diagnostic ignored "-Wlogical-op" +# pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations" +# endif #endif int conf_lex(YYSTYPE* lvalp, void* scanner); diff --git a/libmemcached/response.cc b/libmemcached/response.cc index 96772ff3..85d675bb 100644 --- a/libmemcached/response.cc +++ b/libmemcached/response.cc @@ -663,7 +663,7 @@ static memcached_return_t binary_read_one_response(org::libmemcached::Instance* char touch_buffer[32]; // @todo document this number rc= memcached_safe_read(instance, buffer, sizeof(touch_buffer)); } - return MEMCACHED_SUCCESS; + return memcached_set_error(*instance, rc, MEMCACHED_AT); } case PROTOCOL_BINARY_CMD_NOOP: diff --git a/m4/ax_harden_compiler_flags.m4 b/m4/ax_harden_compiler_flags.m4 index c2a0d541..2daeb1a1 100644 --- a/m4/ax_harden_compiler_flags.m4 +++ b/m4/ax_harden_compiler_flags.m4 @@ -135,7 +135,6 @@ AC_DEFUN([_HARDEN_CC_COMPILER_FLAGS], _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-prototypes]) _APPEND_COMPILE_FLAGS_ERROR([-Wnested-externs]) _APPEND_COMPILE_FLAGS_ERROR([-Wnormalized=id]) - _APPEND_COMPILE_FLAGS_ERROR([-Wold-style-definition]) _APPEND_COMPILE_FLAGS_ERROR([-Woverride-init]) _APPEND_COMPILE_FLAGS_ERROR([-Wpointer-arith]) _APPEND_COMPILE_FLAGS_ERROR([-Wpointer-sign]) @@ -268,7 +267,7 @@ AC_DEFUN([_HARDEN_CXX_COMPILER_FLAGS], _APPEND_COMPILE_FLAGS_ERROR([-Wunsafe-loop-optimizations]) _APPEND_COMPILE_FLAGS_ERROR([-funsafe-loop-optimizations]) _APPEND_COMPILE_FLAGS_ERROR([-Wc++11-compat]) - _APPEND_COMPILE_FLAGS_ERROR([-Weffc++]) +# _APPEND_COMPILE_FLAGS_ERROR([-Weffc++]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=thread]) @@ -289,7 +288,7 @@ AC_DEFUN([_HARDEN_CXX_COMPILER_FLAGS], _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr]) - _APPEND_COMPILE_FLAGS_ERROR([-Wold-style-cast]) +# _APPEND_COMPILE_FLAGS_ERROR([-Wold-style-cast]) _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered]) _APPEND_COMPILE_FLAGS_ERROR([-Wunused]) _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result])