From: Jordan Petridis Date: Fri, 10 Apr 2020 15:22:21 +0000 (+0300) Subject: gstmsdkdec: fix logical operation that misses parenthesis X-Git-Tag: 1.19.3~507^2~2060 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87fc038f673575630225a774b627293bc25b0b71;p=platform%2Fupstream%2Fgstreamer.git gstmsdkdec: fix logical operation that misses parenthesis in C, & is weaker than the ! operator and clang is giving the following error about it. ``` ../subprojects/gst-plugins-bad/sys/msdk/gstmsdkdec.c:731:7: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses] if (!gst_msdk_context_get_job_type (thiz->context) & GST_MSDK_JOB_DECODER) { ^ ~ ../subprojects/gst-plugins-bad/sys/msdk/gstmsdkdec.c:731:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!gst_msdk_context_get_job_type (thiz->context) & GST_MSDK_JOB_DECODER) { ^ ( ) ../subprojects/gst-plugins-bad/sys/msdk/gstmsdkdec.c:731:7: note: add parentheses around left hand side expression to silence this warning if (!gst_msdk_context_get_job_type (thiz->context) & GST_MSDK_JOB_DECODER) { ^ ( ) 1 error generated. ``` --- diff --git a/sys/msdk/gstmsdkdec.c b/sys/msdk/gstmsdkdec.c index 846b2e8..86ba58b 100644 --- a/sys/msdk/gstmsdkdec.c +++ b/sys/msdk/gstmsdkdec.c @@ -728,7 +728,7 @@ gst_msdkdec_context_prepare (GstMsdkDec * thiz) GST_INFO_OBJECT (thiz, "Found context %" GST_PTR_FORMAT " from neighbour", thiz->context); - if (!gst_msdk_context_get_job_type (thiz->context) & GST_MSDK_JOB_DECODER) { + if (!(gst_msdk_context_get_job_type (thiz->context) & GST_MSDK_JOB_DECODER)) { gst_msdk_context_add_job_type (thiz->context, GST_MSDK_JOB_DECODER); return TRUE; }