Message ID | 20200910084948.8186-1-rosenp@gmail.com |
---|---|
State | New |
Headers | show |
Series | v4l-helpers: don't mix enum type with int | expand |
diff --git a/utils/common/v4l-helpers.h b/utils/common/v4l-helpers.h index e093e717..c09cd987 100644 --- a/utils/common/v4l-helpers.h +++ b/utils/common/v4l-helpers.h @@ -876,8 +876,10 @@ static inline unsigned v4l_format_g_hsv_enc(const struct v4l2_format *fmt) { unsigned hsv_enc = v4l_format_g_ycbcr_enc(fmt); + if (hsv_enc == V4L2_HSV_ENC_180) + return V4L2_HSV_ENC_180; - return hsv_enc < V4L2_HSV_ENC_180 ? V4L2_HSV_ENC_180 : hsv_enc; + return hsv_enc; } static inline void v4l_format_s_quantization(struct v4l2_format *fmt,
warning: enumeral and non-enumeral type in conditional expression return hsv_enc < V4L2_HSV_ENC_180 ? V4L2_HSV_ENC_180 : hsv_enc; Signed-off-by: Rosen Penev <rosenp@gmail.com> --- utils/common/v4l-helpers.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)