Update for new warnings.
authorBrian Aker <brian@tangent.org>
Tue, 12 Feb 2013 05:44:21 +0000 (00:44 -0500)
committerBrian Aker <brian@tangent.org>
Tue, 12 Feb 2013 05:44:21 +0000 (00:44 -0500)
libhashkit/md5.cc
libmemcached/csl/parser.yy
libmemcached/response.cc
m4/ax_harden_compiler_flags.m4

index 71069dbdd4f53b4339d1b9f83353b708d2613d93..cf68e3ca6dd2298c595ac9920952c3acbfe42ed9 100644 (file)
@@ -71,6 +71,8 @@ documentation and/or software.
 #include <string.h>
 #include <sys/types.h>
 
+#pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations"
+
 /* POINTER defines a generic pointer type */
 typedef unsigned char *POINTER;
 typedef const unsigned char *CONST_POINTER;
index 3ee3940f3e9809660775e46ac9323e2bb3a52fef..dd9c720b9631009f2ac0277eb51c2f2fdc7ae2ff 100644 (file)
@@ -66,13 +66,14 @@ class Context;
 #include <libmemcached/csl/scanner.h>
 
 #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);
index 96772ff380ac064d6182da66dd94ae6f89f04c97..85d675bb53bc9bc4bbb859423d8e754c5d2d4712 100644 (file)
@@ -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:
index c2a0d5411d0f0cc8bccd3152e74e7b5d4c88a36d..2daeb1a19c4015c9c67ebdd0237c5bcd5f48b2ab 100644 (file)
@@ -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])