From 0305fba4a390f43f6820f70e9ede00f00157ec6e Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Thu, 9 May 2019 12:00:30 +0200 Subject: [PATCH] Fix compilation error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Passing int constant directly to OCF_PL_NEXT_ON_SUCCESS_RET() macro caused following compilation error (on GCC 7.4.0): src/ocf/mngt/ocf_mngt_core.c:599:33: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context] error ? -OCF_ERR_WRITE_CACHE : 0); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/ocf/mngt/../utils/utils_pipeline.h:145:6: note: in definition of macro ‘OCF_PL_NEXT_ON_SUCCESS_RET’ if (error) \ ^~~~~ Signed-off-by: Robert Baldyga --- src/mngt/ocf_mngt_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mngt/ocf_mngt_core.c b/src/mngt/ocf_mngt_core.c index d3b9e8b..2189511 100644 --- a/src/mngt/ocf_mngt_core.c +++ b/src/mngt/ocf_mngt_core.c @@ -595,8 +595,8 @@ static void ocf_mngt_cache_remove_core_flush_sb_complete(void *priv, int error) { struct ocf_mngt_cache_remove_core_context *context = priv; - OCF_PL_NEXT_ON_SUCCESS_RET(context->pipeline, - error ? -OCF_ERR_WRITE_CACHE : 0); + error = error ? -OCF_ERR_WRITE_CACHE : 0; + OCF_PL_NEXT_ON_SUCCESS_RET(context->pipeline, error); } static void _ocf_mngt_cache_remove_core(ocf_pipeline_t pipeline, void *priv,