From 5662c243026bf5b14e8696fa4fe961589470d199 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Thu, 31 May 2018 00:12:23 +0000 Subject: [PATCH] qpid-cpp: fix build after #28029 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When -O2 from hardening does not redefine -O3 from CMake, the build fails with: src/qpid/broker/SelectorExpression.cpp: In member function ‘qpid::broker::Expression* qpid::broker::Parse::orExpression(qpid::broker::Tokeniser&)’: src/qpid/broker/SelectorExpression.cpp:1041:13: error: ‘*((void*)& s +17)’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (s[1]=='b' || s[1]=='B') { --- pkgs/servers/amqp/qpid-cpp/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/amqp/qpid-cpp/default.nix b/pkgs/servers/amqp/qpid-cpp/default.nix index a838fa3b904c..8446578507d8 100644 --- a/pkgs/servers/amqp/qpid-cpp/default.nix +++ b/pkgs/servers/amqp/qpid-cpp/default.nix @@ -35,8 +35,9 @@ let NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" - "-Wno-error=unused-function" "-Wno-error=int-in-bool-context" + "-Wno-error=maybe-uninitialized" + "-Wno-error=unused-function" ]; };