Skip to content

cplay.c:153: bad expression ? #13

@dcb314

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions