From 5f59e812ce0ffa2a889fca59467f50579d4caf1a Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 3 Mar 2016 12:11:45 +0100 Subject: [PATCH] dataflow_cpp: fixed codesonar warning --- containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h b/containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h index 572aa32..b5ff2c5 100644 --- a/containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h +++ b/containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h @@ -123,8 +123,10 @@ bool LockFreeStack< Type, ValuePool >::TryPop(Type & element) { top_cached = top; // Stack empty, cannot pop - if (top_cached == NULL) + if (top_cached == NULL) { + element = Type(); return false; + } // Guard top_cached hazardPointer.Guard(0, top_cached); -- libgit2 0.26.0