Skip to contentSkip to conversation

cplay.c:153: bad expression ?

DISCUSSION GitHub issues - opened 1 participant 1 message Apr 19, 2022 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

alsa-project/tinycompress issue #13 was opened from dcb314:

I just tried to compile tinycompress with the new C compiler clang-14. It said:

cplay.c:153:34: warning: & has lower precedence than !=; != will be evaluated first [-Wparentheses]

Source code is

   if ((buf[0] != 0xff) || (buf[1] & 0xf0 != 0xf0))

Suggest new code:

   if ((buf[0] != 0xff) || ((buf[1] & 0xf0) != 0xf0))

Issue URL : https://github.com/alsa-project/tinycompress/issues/13
Repository URL: https://github.com/alsa-project/tinycompress