firmware icon indicating copy to clipboard operation
firmware copied to clipboard

Warnings generated during compilation

Open thebentern opened this issue 1 year ago • 3 comments

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

thebentern avatar Jun 26 '24 12:06 thebentern

@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?

jp-bennett avatar Jun 26 '24 16:06 jp-bennett

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

thebentern avatar Jun 26 '24 17:06 thebentern

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.

jp-bennett avatar Jun 26 '24 18:06 jp-bennett