From fbc1c5a6626478161b5b44e3f313e2ed8656975d Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sat, 13 Jul 2013 21:00:32 -0600 Subject: [PATCH] Fix assert() with side effects assert() may be completely removed by precompiler when optimizing. Such that the code conditional never gets run. --- src/HttpRequest.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index bfb6e571ea..0360807815 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -234,7 +234,8 @@ HttpRequest::clone() const copy->extacl_log = extacl_log; copy->extacl_message = extacl_message; - assert(copy->inheritProperties(this)); + const bool inheritWorked = copy->inheritProperties(this); + assert(inheritWorked); return copy; } -- 2.47.3