Add missing return statements which fix crashes in release mode.
Add flag to compiler so that it generates an error when a returning function does not return something...
This commit is contained in:
parent
5225706cc8
commit
0db16bd827
5 changed files with 8 additions and 8 deletions
|
|
@ -9,7 +9,7 @@ using namespace Pinetime::Applications;
|
|||
|
||||
Pinetime::Drivers::st7789 lcd;
|
||||
ret_code_t lcd_init() {
|
||||
lcd.Init();
|
||||
return lcd.Init();
|
||||
}
|
||||
|
||||
void lcd_dummy() {
|
||||
|
|
@ -38,7 +38,7 @@ static lcd_cb_t st7789_cb = {
|
|||
.width = 240
|
||||
};
|
||||
|
||||
const nrf_lcd_t nrf_lcd_st7789 = {
|
||||
static const nrf_lcd_t nrf_lcd_st7789 = {
|
||||
.lcd_init = lcd_init,
|
||||
.lcd_uninit = lcd_dummy,
|
||||
.lcd_pixel_draw = lcd_pixel_draw,
|
||||
|
|
@ -64,7 +64,7 @@ void DisplayApp::Process(void *instance) {
|
|||
auto* app = static_cast<DisplayApp*>(instance);
|
||||
|
||||
NRF_LOG_INFO("DisplayApp task started!");
|
||||
gfx_initialization();
|
||||
app->gfx_initialization();
|
||||
uint8_t hour = 0;
|
||||
uint8_t minute = 1;
|
||||
while (1) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Pinetime {
|
|||
private:
|
||||
TaskHandle_t taskHandle;
|
||||
static void Process(void* instance);
|
||||
static void gfx_initialization();
|
||||
void gfx_initialization();
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue