meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
2.99k stars 715 forks source link

Warnings generated during compilation #4180

Open thebentern opened 1 week ago

thebentern commented 1 week ago

Category

Other

Hardware

Not Applicable

Firmware Version

Current master

Description

Warnings generated during compilation

src/graphics/Screen.h:524:13: warning: 'void drawCompassNorth(OLEDDisplay*, int16_t, int16_t, float)' defined but not used [-Wunused-function]
 static void drawCompassNorth(OLEDDisplay *display, int16_t compassX, int16_t compassY, float myHeading)

Relevant log output

No response

jp-bennett commented 1 week ago

@thebentern What target throws this warning? And the broader question, how do we want to handle functions that could be useful for multiple targets, but isn't used for all of them?

thebentern commented 1 week ago

Multiple targets. Heltec V3 is a good example. We can guardclause it if need-be.

jp-bennett commented 1 week ago

It seems like it's complaining because it's a static function, that's not part of the Screen class. Maybe the right answer here is to make it a normal class function instead.