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

Fixable compiler warnings: math_helper.c #53

Closed
dspdon opened this issue Aug 7, 2021 · 2 comments
Closed

Fixable compiler warnings: math_helper.c #53

dspdon opened this issue Aug 7, 2021 · 2 comments
Assignees
Labels
ArduinoCore-samd Label for ArduinoCore-samd UAY Unassigned yet

Comments

@dspdon
Copy link

dspdon commented Aug 7, 2021

I build with full warnings, and found a few places where small changes can remove compile warnings.

There are 2 compiler warnings coming from math_helper.c:
https://github.com/Seeed-Studio/ArduinoCore-samd/blob/master/cores/arduino/math_helper.c

These 2 warnings are copied below. I can submit a PR if that's the best approach, but wanted to first check if the primary dev team wishes to address these directly.

There are a few correctness issues in these and other conversion functions in math_helper.c that do not generate compile warnings, for values/ranges where perhaps the functions aren't being used today. Where are the functions in this file being used?

--Don

C:\Users\don\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.2\cores\arduino\math_helper.c: In function 'arm_compare_fixed_q15':
C:\Users\don\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.2\cores\arduino\math_helper.c:175:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(diffCrnt > maxDiff)
^
C:\Users\don\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.2\cores\arduino\math_helper.c: In function 'arm_compare_fixed_q31':
C:\Users\don\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.2\cores\arduino\math_helper.c:203:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(diffCrnt > maxDiff)
^

@MatthewJeffson MatthewJeffson added UAY Unassigned yet ArduinoCore-samd Label for ArduinoCore-samd labels Oct 9, 2024
@Lesords Lesords self-assigned this Oct 14, 2024
@Lesords
Copy link

Lesords commented Oct 16, 2024

Hello,

I'm very sorry to have kept you waiting so long.

Do you still have this problem now?

@Lesords
Copy link

Lesords commented Nov 4, 2024

Hello,

I'm going to close this issue, feel free to re-open it if you have any other questions.

[Autocommentary]

@Lesords Lesords closed this as completed Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ArduinoCore-samd Label for ArduinoCore-samd UAY Unassigned yet
Projects
Status: Done
Development

No branches or pull requests

3 participants