-
Notifications
You must be signed in to change notification settings - Fork 31
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
[0.4.x] libvisual: fix accidental assignment instead of equality check #351
base: 0.4.x
Are you sure you want to change the base?
[0.4.x] libvisual: fix accidental assignment instead of equality check #351
Conversation
with the accidental assignment, the function would always return 0 for a keytype of VISUAL_HASHMAP_KEY_TYPE_STRING (because it has a value of 2), which is technically valid but not good for obvious reasons
1b34a3a
to
2f46fab
Compare
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.
@kaixiong what do you think?
Nice find. Neither Clang nor GCC warns about this assignment? |
i don't know about gcc, but i found out about this because clang warned about it when i was bumping libvisual for chimera linux:
|
@kaixiong outside of |
with the accidental assignment, the function would always return 0 for a keytype of VISUAL_HASHMAP_KEY_TYPE_STRING (because it has a value of 2), which is technically valid but not good for obvious reasons