-
Notifications
You must be signed in to change notification settings - Fork 6
ladislas/feature/compiler add warnings #1237
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
base: develop
Are you sure you want to change the base?
Conversation
ladislas
commented
Jan 2, 2023
- 🚨 (warnings): Turn off -Wdeprecated-volatile
- 🚨 (warnings): Turn off -Wformat-security
- 🔧 (cmake): Turn off -Wshadow
- 🚨 (warnings): FileManager - Fix -Wshadow
File comparision analysis report🔖 Info
Click to show memory sections📝 SummaryClick to show summary
🗺️ Map files diff outputClick to show diff list
|
File comparision analysis report🔖 Info
Click to show memory sections📝 SummaryClick to show summary
🗺️ Map files diff outputClick to show diff list
|
Codecov Report
@@ Coverage Diff @@
## develop #1237 +/- ##
========================================
Coverage 96.21% 96.21%
========================================
Files 150 150
Lines 3727 3730 +3
========================================
+ Hits 3586 3589 +3
Misses 141 141
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
c976798 to
2d15663
Compare
2d15663 to
9abb034
Compare
9abb034 to
14075e9
Compare
14075e9 to
29317f8
Compare
YannLocatelli
left a comment
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.
There are some more warnings
warning: 'corevideo' initialized and declared 'extern'
166 | extern "C" auto corevideo =
in
- spikes/lk_behavior_kit/main.cpp:166:19
- spikes/lk_command_kit/main.cpp:146:18
- spikes/lk_fs/main.cpp:79:18
- spikes/lk_lcd/main.cpp:59:17
- spikes/lk_reinforcer/main.cpp:182:18
- app/os/main.cpp:251:18
warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits]
61 | if ((actual >= lower_bound && actual <= counter_mask) || (actual >= 0 && actual <= upper_bound)) {
in
- tests/functional/include/tests/utils_sleep.h:61:68
warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
50 | i = *(int *)&x;
in
- libs/Utils/source/MathUtils.cpp:50:7
warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
53 | x = *(float *)&i;
in
- libs/Utils/source/MathUtils.cpp:53:7
warning: variable 'log_isr_lambda' set but not used [-Wunused-but-set-variable]
47 | auto log_isr_lambda = [] {
in
- spikes/lk_log_kit/main.cpp:47:7
Yes, I started by focusing on unit tests first
cannot be "fixed" but silenced if needed.
can be silenced with a comment saying that the code is from mbed-os and kept as is for the moment
can be silenced as well as we are using "official" code implementation for the fast invert square root that being said, this code will be removed in the future when we start using the new fusion algorithms which ship their own implementation
I'll look into it, but it's done for testing |
to silence mbed related warnings that we cannot fix
-Wshadow (https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html) > Warn whenever a local variable or type declaration shadows another variable, parameter, type, class member (in C++), or instance variable (in Objective-C) or whenever a built-in function is shadowed. Note that in C++, the compiler warns if a local variable shadows an explicit typedef, but not if it shadows a struct/class/enum.
-Wconversion (https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html) > Warn for implicit conversions that may alter a value. This includes conversions between real and integer, like abs (x) when x is double; conversions between signed and unsigned, like unsigned ui = -1; and conversions to smaller types, like sqrtf (M_PI). Do not warn for explicit casts like abs ((int) x) and ui = (unsigned) -1, or if the value is not changed by the conversion like in abs (2.0). Warnings about conversions between signed and unsigned integers can be disabled by using -Wno-sign-conversion. > > For C++, also warn for confusing overload resolution for user-defined conversions; and conversions that never use a type conversion operator: conversions to void, the same type, a base class or a reference to them. Warnings about conversions between signed and unsigned integers are disabled by default in C++ unless -Wsign-conversion is explicitly enabled. o
- fix reinterpret cast warnings - replace c-arrays with std::array - fix magic number warnings - cleanup comments - NOLINT trailing return types + privat variables for tests
29317f8 to
b816730
Compare
Version comparison
|
|
Kudos, SonarCloud Quality Gate passed! |







