8000 src/main/engine/ocrash.cpp:863: possible bad expression ? · Issue #124 · djyt/cannonball · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

src/main/engine/ocrash.cpp:863: possible bad expression ? #124

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

Open
dcb314 opened this issue Apr 20, 2022 · 0 comments
Open

src/main/engine/ocrash.cpp:863: possible bad expression ? #124

dcb314 opened this issue Apr 20, 2022 · 0 comments

Comments

@dcb314
Copy link
dcb314 commented Apr 20, 2022

New C compiler clang-14 says:

src/main/engine/ocrash.cpp:863:51: warning: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Wparentheses]

Source code is

slide = ((spins + 1) << 2) + (car_inc > 0xFF) ? 0xFF >> 3 : car_inc >> 3;

Maybe better code:

slide = ((spins + 1) << 2) + ((car_inc > 0xFF) ? 0xFF >> 3 : car_inc >> 3);
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
0