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

Incorrect bitwise comparison on aq_ring.c #29

Open
jm-mikkelsen opened this issue Apr 12, 2023 · 0 comments
Open

Incorrect bitwise comparison on aq_ring.c #29

jm-mikkelsen opened this issue Apr 12, 2023 · 0 comments

Comments

@jm-mikkelsen
Copy link

Building on FreeBSD 13.1 and 13.2 gives this warning:

--- aq_ring.o ---
aq_ring.c:364:37: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]
                if ((rx_desc->wb.pkt_type & 0x60) == 1) {
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
1 warning generated.

This looks like it really should be != 0, but it could also be that it should be == 0. Either way, this is a bug.

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

1 participant