From 6a0f35c63c658443726898e66ff1bcbbf3838ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Duda?= Date: Tue, 13 Nov 2018 00:54:40 +0100 Subject: [PATCH] [coap] remove functional code from assert (#3288) --- src/core/coap/coap.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/coap/coap.hpp b/src/core/coap/coap.hpp index 1d40b0dd0..72f1afc8b 100644 --- a/src/core/coap/coap.hpp +++ b/src/core/coap/coap.hpp @@ -304,7 +304,9 @@ public: */ static void RemoveFrom(Message &aMessage) { - assert(aMessage.SetLength(aMessage.GetLength() - sizeof(EnqueuedResponseHeader)) == OT_ERROR_NONE); + otError error = aMessage.SetLength(aMessage.GetLength() - sizeof(EnqueuedResponseHeader)); + assert(error == OT_ERROR_NONE); + OT_UNUSED_VARIABLE(error); } /**