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 additional warnings #2849

Merged
merged 15 commits into from
Jul 2, 2024
Merged

Fix additional warnings #2849

merged 15 commits into from
Jul 2, 2024

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Jul 2, 2024

Move sanitizers to main build, add BUILD_VARS

Although asan/ubsan aren't supported for embedded targets,
there do appear to be more extensive compile-time checks which are useful.
Just be nice at the end and don't try to link anything.

Remove Windows esp32 dist directory after installing tools

Saves 750+MB from cache (per image; 2 images).

Build with additional warnings in STRICT, and fix most of them

Switch statements may fall through: use [[falthrough]] for C++.
There isn't yet a standard for C, though /* fallthrough */ comments seem to work for some compilers (not all).

Unused parameters. Happens for some code when debug isn't enabled - apply [[maybe_unused]] in C++.
For others remove parameter name (C++ only), unless it's useful/descriptive.
For C there is no standard, so just using (void) cast statement.
Leave those which might mask other issues, such as code which isn't yet implemented.
esp-idf has lots of unused parameter warnings; quench those.

Base class X should be explicitly initialized in the copy constructor

Fix 'type qualifiers ignored on function return type'

Fix use of signed/unsigned types

Remove unused code from Wire library

I2Cdev has similar crud but needs far more work. Leave it.

Fix Graphics library bugs

Unused parameter warnings highlighted bugs in Region and SolidBrush classes.
Make Region constructor explicit.

muldivMaxValue parameter 1 never used, not required

Update scanlog.py

There are lots of duplicate warnings in logs, so update this tool to de-duplicate and categorise them by source line.

Support scanning logs obtained via github CLI
Integrate GH fetch
Add Job information
Scan warnings, deduplicate and support filtering
Add README

mikee47 added 14 commits July 2, 2024 09:16
Saves 750+MB from cache (per image; 2 images).
Although asan/ubsan aren't supported for embedded targets,
there do appear to be more extensive compile-time checks which are useful.
Just be nice at the end and don't try to link anything.
Of particular note:

- switch statements, may fall through: use [[falthrough]] for C++, not sure what to do for C
- unused paramter. Happens for some code when debug isn't enabled - apply [[maybe_unused]]. For others remove parameter name, unless it's useful/descriptive
I2Cdev has similar crud but needs far more work. Leave it.
Some are used in debug statements, [[maybe_unused]], others never used
Leave those which might mask other issues, such as code which isn't yet implemented
Support scanning logs obtained via github CLI
Integrate GH fetch
Add Job information
Scan warnings
@slaff slaff added this to the 5.2.0 milestone Jul 2, 2024
Tools/ci/README.rst Outdated Show resolved Hide resolved
@slaff slaff merged commit 5b70cc1 into SmingHub:develop Jul 2, 2024
47 of 48 checks passed
@mikee47 mikee47 deleted the fix/extra-warnings branch July 2, 2024 11:12
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

Successfully merging this pull request may close these issues.

2 participants