-
Notifications
You must be signed in to change notification settings - Fork 44
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
No more gcc/clang warnings #169
Conversation
…urn-type warnings
Fixes these types of warnings: cast between incompatible function types from ‘br_uint_32 (*)(br_actor *, void *)’ {aka ‘unsigned int (*)(struct br_actor *, void *)’} to ‘intptr_t (*)(br_actor *, void *)’ {aka ‘long int (*)(struct br_actor *, void *)’} [-Wcast-function-type]
I also fixed a few |
src/DETHRACE/common/opponent.c
Outdated
BrVector3Cross(&displacement, &positive_y_vector, &direction_v); | ||
BrVector3Normalise(&displacement, &displacement); | ||
BrVector3Scale(&displacement, &displacement, (pMassage_count / 4) * 0.1f); | ||
} else { | ||
BrVector3Normalise(&displacement, &displacement); | ||
BrVector3Scale(&displacement, &displacement, (pMassage_count / 4) * 0.5f); | ||
BrVector3Normalise(&direction_v, &direction_v); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right - the original code here is not quite correct. After looking at it again, I think it should be this though (slightly different from what you propose:
BrVector3Normalise(&displacement, &direction_v);
BrVector3Scale(&displacement, &displacement, (pMassage_count / 4) * 0.5f);
This pr fixes all gcc/clang warnings.
-Werror
for Apple/clang is not (yet) enabled, as I would like to fix MSVC warnings in a future pr first.