Skip to content

[andino_firmware] Add -Wconversion and -Wsign-conversion and fix resulting issues - #333

Open
jballoffet wants to merge 2 commits into
mainfrom
jballoffet/chore/add-wconversion-compiler-flag
Open

[andino_firmware] Add -Wconversion and -Wsign-conversion and fix resulting issues#333
jballoffet wants to merge 2 commits into
mainfrom
jballoffet/chore/add-wconversion-compiler-flag

Conversation

@jballoffet

@jballoffet jballoffet commented Aug 15, 2026

Copy link
Copy Markdown
Member

🎉 New feature

Summary

This PR adds -Wconversion and -Wsign-conversion to build_src_flags, and fixes issues by changing types at the source where it made sense, rather than just casting.

Test it

docker compose -f docker/compose.yaml run --rm dev pio run -e uno                        
Container andino-firmware-dev-run-479be10d0d46 Creating 
Container andino-firmware-dev-run-479be10d0d46 Created 
Processing uno (board: uno; platform: atmelavr; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/uno.html
PLATFORM: Atmel AVR (5.3.0) > Arduino Uno
HARDWARE: ATMEGA328P 16MHz, 2KB RAM, 31.50KB Flash
DEBUG: Current (avr-stub) External (avr-stub, simavr)
PACKAGES: 
 - framework-arduino-avr @ 5.4.0 
 - toolchain-atmelavr @ 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 8 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Wire @ 1.0
|-- SPI @ 1.0
|-- Adafruit BNO055 @ 1.6.4
|-- Adafruit BusIO @ 1.17.4
|-- Adafruit Unified Sensor @ 1.1.15
Building in release mode
Checking size .pio/build/uno/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=====     ]  51.0% (used 1045 bytes from 2048 bytes)
Flash: [=====     ]  50.7% (used 16362 bytes from 32256 bytes)
============================================================================================================= [SUCCESS] Took 0.54 seconds =============================================================================================================

Environment    Status    Duration
-------------  --------  ------------
uno            SUCCESS   00:00:00.538
============================================================================================================= 1 succeeded in 00:00:00.538 =============================================================================================================

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Javier Balloffet <javier.balloffet@gmail.com>
@github-project-automation github-project-automation Bot moved this to 🆕 Backlog in Andino Roadmap Aug 15, 2026
@jballoffet jballoffet changed the title Jballoffet/chore/add wconversion compiler flag Add -Wconversion and -Wsign-conversion and fix resulting issues Aug 15, 2026
Signed-off-by: Javier Balloffet <javier.balloffet@gmail.com>
@jballoffet
jballoffet force-pushed the jballoffet/chore/add-wconversion-compiler-flag branch from 5637d35 to f73fd5b Compare August 15, 2026 16:54
@jballoffet jballoffet changed the title Add -Wconversion and -Wsign-conversion and fix resulting issues [andino_firmware] Add -Wconversion and -Wsign-conversion and fix resulting issues Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🆕 Backlog

Development

Successfully merging this pull request may close these issues.

1 participant