Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cplay.c:153: bad expression ? #13

Open
dcb314 opened this issue Apr 19, 2022 · 3 comments
Open

cplay.c:153: bad expression ? #13

dcb314 opened this issue Apr 19, 2022 · 3 comments

Comments

@dcb314
Copy link

dcb314 commented Apr 19, 2022

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))

@dbaluta
Copy link
Contributor

dbaluta commented Sep 6, 2022

@dcb314 can you send a patch for this?

@vinodkoul
Copy link
Contributor

right, as @dbaluta said, a patch is welcome

@dcb314
Copy link
Author

dcb314 commented Sep 8, 2022

@dcb314 can you send a patch for this?

Sorry, no. I just find them, I don't fix them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants