From: Vinod Koul Date: Thu, 13 Oct 2022 12:45:54 +0000 (+0530) Subject: cplay: add parentheses around comparison in operand of ‘&’ X-Git-Tag: v1.2.8~1 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=f3ba6e5c2126f2fb07e3d890f990d50c3e204e67;p=tinycompress.git cplay: add parentheses around comparison in operand of ‘&’ 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 --- 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) {