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

signed-unsigned comparison is always false #21

Open
ku3i opened this issue Feb 10, 2024 · 0 comments
Open

signed-unsigned comparison is always false #21

ku3i opened this issue Feb 10, 2024 · 0 comments

Comments

@ku3i
Copy link

ku3i commented Feb 10, 2024

local variable m is of unsigned type:

Adafruit_FreeTouch.cpp: In member function 'uint16_t Adafruit_FreeTouch::measure()':
Adafruit_FreeTouch.cpp:111:9: warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (m == -1)

https://github.com/adafruit/Adafruit_FreeTouch/blob/cf2f2f6d5916aa208628b531ef369effb3950478/Adafruit_FreeTouch.cpp#L111C3-L111C15

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