-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fixed some unsigned/signed compile warnings warnings & unused variables #4639
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request updates several variable declarations to use Changes
Possibly Related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🧰 Additional context used🧬 Code Graph Analysis (1)wled00/FX_fcn.cpp (2)
🔇 Additional comments (5)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -367,7 +367,7 @@ WLED_GLOBAL wifi_options_t wifiOpt _INIT_N(({0, 1, false, AP_BEHAVIOR_BOOT_NO_CO | |||
#define noWifiSleep wifiOpt.noWifiSleep | |||
#define force802_3g wifiOpt.force802_3g | |||
#else | |||
WLED_GLOBAL int8_t selectedWiFi _INIT(0); | |||
WLED_GLOBAL size_t selectedWiFi _INIT(0); |
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.
this wastes precious ram
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.
in that case i will put uint8_t
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.
not a good idea, it must be signed.
unless you went through all the code where its used and are 100% sure unsigned does not lead to any undefined behavirou.
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.
yes i have wen through all the code and ensured that its only used with positive numbers and size_t comparison.
let me know if you think i should uint8_t or just revert it
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.
Leave the networking code alone.
I have a huge modification of it waiting for upstream.
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.
alright then
in general: if you use size_t make sure there are no compile errors on all supported platforms. Did you run it on all envs? |
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 do not agree to any change. No reason given.
as its related to wifi , i have compiled of course all esp platforms ( esp32 / S2 / C3 / ESP8266) |
fixed some unsigned/signed compile warnings warnings & unused variables
Summary by CodeRabbit