From f3ba6e5c2126f2fb07e3d890f990d50c3e204e67 Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Thu, 13 Oct 2022 18:15:54 +0530 Subject: [PATCH] =?utf8?q?cplay:=20add=20parentheses=20around=20comparison?= =?utf8?q?=20in=20operand=20of=20=E2=80=98&=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We get a warning: cplay.c: In function ‘find_adts_header’: cplay.c:259:41: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses] 259 | if ((buf[0] != 0xff) || (buf[1] & 0xf0 != 0xf0)) Resolve by adding a parentheses around "&" case Signed-off-by: Vinod Koul --- src/utils/cplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/cplay.c b/src/utils/cplay.c index 9b5af05..14f163d 100644 --- a/src/utils/cplay.c +++ b/src/utils/cplay.c @@ -255,7 +255,7 @@ int find_adts_header(FILE *file, unsigned int *num_channels, unsigned int *sampl } fseek(file, 0, SEEK_SET); - if ((buf[0] != 0xff) || (buf[1] & 0xf0 != 0xf0)) + if ((buf[0] != 0xff) || ((buf[1] & 0xf0) != 0xf0)) return 0; /* mpeg id */ switch (buf[1]>>3 & 0x1) { -- 2.47.3