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

Fix warning: suggest parentheses around comparison in operand of ‘!=’ #2721

Open
wants to merge 1 commit into
base: 4.2
Choose a base branch
from

Conversation

jhasse
Copy link
Contributor

@jhasse jhasse commented Dec 28, 2024

spine-c/spine-c/src/spine/Bone.c: In function ‘spBone_updateWorldTransformWith’: spine-c/spine-c/src/spine/Bone.c:169:64: warning: suggest parentheses around comparison in operand of ‘!=’ [-Wparentheses]
  169 |                                 (pa * pd - pb * pc < 0) != (sx < 0 != sy < 0))
      |                                                             ~~~^~~
spine-c/spine-c/src/spine/Bone.c: In function ‘spBone_updateAppliedTransform’:
spine-c/spine-c/src/spine/Bone.c:284:76: warning: suggest parentheses around comparison in operand of ‘!=’ [-Wparentheses]
  284 |                                         pid < 0 != (self->skeleton->scaleX < 0 != (self->skeleton->scaleY * yDownScale) < 0))
      |                                                     ~~~~~~~~~~~~~~~~~~~~~~~^~~
spine-c/spine-c/src/spine/Bone.c:284:45: warning: suggest parentheses around comparison in operand of ‘!=’ [-Wparentheses]
  284 |                                         pid < 0 != (self->skeleton->scaleX < 0 != (self->skeleton->scaleY * yDownScale) < 0))
      |                                         ~~~~^~~

with gcc 14

@jhasse jhasse force-pushed the fix-warning-parentheses branch from 228f78a to 2b8b62c Compare December 28, 2024 10:52
spine-c/spine-c/src/spine/Bone.c: In function ‘spBone_updateWorldTransformWith’:
spine-c/spine-c/src/spine/Bone.c:169:64: warning: suggest parentheses around comparison in operand of ‘!=’ [-Wparentheses]
  169 |                                 (pa * pd - pb * pc < 0) != (sx < 0 != sy < 0))
      |                                                             ~~~^~~
spine-c/spine-c/src/spine/Bone.c: In function ‘spBone_updateAppliedTransform’:
spine-c/spine-c/src/spine/Bone.c:284:76: warning: suggest parentheses around comparison in operand of ‘!=’ [-Wparentheses]
  284 |                                         pid < 0 != (self->skeleton->scaleX < 0 != (self->skeleton->scaleY * yDownScale) < 0))
      |                                                     ~~~~~~~~~~~~~~~~~~~~~~~^~~
spine-c/spine-c/src/spine/Bone.c:284:45: warning: suggest parentheses around comparison in operand of ‘!=’ [-Wparentheses]
  284 |                                         pid < 0 != (self->skeleton->scaleX < 0 != (self->skeleton->scaleY * yDownScale) < 0))
      |                                         ~~~~^~~
@jhasse jhasse force-pushed the fix-warning-parentheses branch from 2b8b62c to c305de2 Compare December 28, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant