* [PATCH] v4l-helpers: don't mix enum type with int
@ 2020-09-10 8:49 Rosen Penev
0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2020-09-10 8:49 UTC (permalink / raw)
To: linux-media
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(-)
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,
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-10 8:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10 8:49 [PATCH] v4l-helpers: don't mix enum type with int Rosen Penev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).