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 minor unused/uninitialized warnings from G++ #1786

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

earlephilhower
Copy link
Contributor

Decorate an unused parameter in the timer API and fill in all structure elements in a PIO API call that generate warnings under GCC 12.

Fixes #1785

@peterharperuk
Copy link
Contributor

Looks good

earlephilhower added a commit to earlephilhower/arduino-pico that referenced this pull request Aug 17, 2024
Remove the skipped error messages once the following PR merged:
raspberrypi/pico-sdk#1786
earlephilhower added a commit to earlephilhower/arduino-pico that referenced this pull request Aug 17, 2024
* Update to 2.0.0 SDK
* Board type needs to be set before earliest SDK setup
* Platform includes update
* Boot2 files
* Simple compilation issues
* Build and link
* PIO rebuild with version
* Newlib wrapper update
* Force inclusion of runtime_init_* fcns
The linker was dropping all references to the library's included
runtime_init_xxx functions and hence things like the IRQ vector
table and mutexes and alarms weren't properly set up leading to
instant crashes on start up..

Explicitly call out one function from the object file stored in
the .A to force the inclusion of all the functions.  May be a better
way, heppy to hear any ideas.
* Fix SPI GPIO calls
* Fix Ethernet GPIO
* Remove SDK warnings
Remove the skipped error messages once the following PR merged:
raspberrypi/pico-sdk#1786
* BTStack moved SBC encode/decode paths
* Platform.IO fixes
* BT No longer has special absolute mouse
* Rebuild and update OTA
* Rebuild BearSSL, too
* Update liker file to latest SDK
* Clean up libpicocmake
* Clean up LWIP/BT library names
@kilograham kilograham changed the title Fix minor unused/uninitialized warnings from GCC 12 Fix minor unused/uninitialized warnings from GCC 12.3.0 Aug 20, 2024
@kilograham
Copy link
Contributor

An ok - I had wondered if this was a c++ thing - the {0} is valid C but had seen reports of some versions (albeit old) reporting that exact message

@earlephilhower
Copy link
Contributor Author

I had forgot about that simpler {} solution! Updated with the change and I can confirm no warnings generated for it in the latest G++s.

@lurch
Copy link
Contributor

lurch commented Nov 14, 2024

As this is now a one-character change, it might be worth squashing the commits?

Use empty initializer list for struct clearing, avoiding a pedantic
warning from G++ 12 and 14.

Fixes raspberrypi#1785
@earlephilhower
Copy link
Contributor Author

Done, thx!

@earlephilhower earlephilhower changed the title Fix minor unused/uninitialized warnings from GCC 12.3.0 Fix minor unused/uninitialized warnings from G++ Nov 15, 2024
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.

4 participants