Skip to content

-Wbitwise-conditional-parentheses in drivers/ptp/ptp_ocp.c #1457

@nathanchance

Description

@nathanchance
drivers/ptp/ptp_ocp.c:2065:16: error: operator '?:' has lower precedence than '&'; '&' will be evaluated first [-Werror,-Wbitwise-conditional-parentheses]
                           on & map ? " ON" : "OFF", src);
                           ~~~~~~~~ ^
drivers/ptp/ptp_ocp.c:2065:16: note: place parentheses around the '&' expression to silence this warning
                           on & map ? " ON" : "OFF", src);
                                    ^
                           (       )
drivers/ptp/ptp_ocp.c:2065:16: note: place parentheses around the '?:' expression to evaluate it first
                           on & map ? " ON" : "OFF", src);
                                    ^
                                (                  )
drivers/ptp/ptp_ocp.c:2069:16: error: operator '?:' has lower precedence than '&'; '&' will be evaluated first [-Werror,-Wbitwise-conditional-parentheses]
                           on & map ? " ON" : "OFF", src);
                           ~~~~~~~~ ^
drivers/ptp/ptp_ocp.c:2069:16: note: place parentheses around the '&' expression to silence this warning
                           on & map ? " ON" : "OFF", src);
                                    ^
                           (       )
drivers/ptp/ptp_ocp.c:2069:16: note: place parentheses around the '?:' expression to evaluate it first
                           on & map ? " ON" : "OFF", src);
                                    ^
                                (                  )
2 errors generated.

Patch submitted: https://lore.kernel.org/r/20210916194351.3860836-1-nathan@kernel.org/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions