diff --git a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp index 0dab3bb412..7c91f746c6 100644 --- a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp +++ b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp @@ -62,7 +62,10 @@ #if ENABLED(DOGLCD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop #include "../../Marlin.h" diff --git a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp index df33f9db62..3466d8b1c3 100644 --- a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp +++ b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp @@ -59,7 +59,10 @@ #if ENABLED(DOGLCD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop #include #include "../Delay.h" diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp index 9cd913f743..d1100c4b90 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp @@ -60,7 +60,10 @@ #if ENABLED(DOGLCD) //#include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop #define SPI_FULL_SPEED 0 #define SPI_HALF_SPEED 1 diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp index 06399d3947..0ed2b2ec2d 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp @@ -81,7 +81,10 @@ #if ENABLED(DOGLCD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop #define I2C_SLA (0x3C*2) //#define I2C_CMD_MODE 0x080 diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp index c61fa4a8ce..537da9763a 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp @@ -60,7 +60,10 @@ #if ENABLED(DOGLCD) //#include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop #include "../Delay.h" #define SPI_FULL_SPEED 0 diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp index 700ed59463..32a0ec66fd 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp @@ -59,7 +59,10 @@ #if ENABLED(DOGLCD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop #include "SoftwareSPI.h" #include "../Delay.h" diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp index 533ebda37c..476e142401 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp @@ -59,7 +59,10 @@ #if ENABLED(DOGLCD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop #include "SoftwareSPI.h" #define SPI_SPEED 2 // About 2 MHz diff --git a/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp b/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp index 3249068299..af1a8819fc 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp @@ -69,7 +69,10 @@ #if ENABLED(DOGLCD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop #include "HAL_LCD_com_defines.h" #define WIDTH 128 diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp index fda5a79c9e..3273fc7dc3 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp @@ -57,7 +57,10 @@ #if ENABLED(DOGLCD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop #include "HAL_LCD_com_defines.h" diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp index 86a9fd110b..774a709463 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp @@ -57,7 +57,10 @@ #if ENABLED(DOGLCD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop #include "HAL_LCD_com_defines.h" diff --git a/Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp index e58bb34fae..36427a8040 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp @@ -61,7 +61,10 @@ #if ENABLED(DOGLCD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop #include "HAL_LCD_com_defines.h" diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp index 71f61a08c3..3448eac11e 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp @@ -42,7 +42,10 @@ #define LCD_PIXEL_WIDTH 128 #define LCD_PIXEL_HEIGHT 64 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop //set optimization so ARDUINO optimizes this file #pragma GCC optimize (3) diff --git a/Marlin/src/lcd/lcdprint_u8g.cpp b/Marlin/src/lcd/lcdprint_u8g.cpp index 37ddd4f088..2a1c44b8c9 100644 --- a/Marlin/src/lcd/lcdprint_u8g.cpp +++ b/Marlin/src/lcd/lcdprint_u8g.cpp @@ -11,7 +11,10 @@ #if ENABLED(DOGLCD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop extern U8GLIB *pu8g; #define _lcd_write(a) pu8g->print(a) #define _lcd_setcursor(col, row) pu8g->setPrintPos((col), (row)); diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index be8958fdac..9b77c80512 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -103,9 +103,7 @@ uint8_t lcd_status_update_delay = 1, // First update one loop delayed #if ENABLED(DOGLCD) #include "ultralcd_impl_DOGM.h" - #include - bool drawing_screen, // = false - first_page; + bool drawing_screen, first_page; // = false #else #include "ultralcd_impl_HD44780.h" constexpr bool first_page = true; diff --git a/Marlin/src/lcd/ultralcd_impl_DOGM.h b/Marlin/src/lcd/ultralcd_impl_DOGM.h index add8e1b07b..436b16f56e 100644 --- a/Marlin/src/lcd/ultralcd_impl_DOGM.h +++ b/Marlin/src/lcd/ultralcd_impl_DOGM.h @@ -58,7 +58,11 @@ #include "../libs/duration_t.h" #endif +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" #include +#pragma GCC diagnostic pop + #include "fontutils.h" #include "u8g_fontutf8.h"