Skip to content

Commit 9b38509

Browse files
committed
[LL] Ignore some warnings
Since core use some LL, build is polluted with several warnings. Mainly unused parameters or strict aliasing. Until this is corrected in official cube release simply ignore them using: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" ... #pragma GCC diagnostic pop Signed-off-by: Frederic.Pillon <[email protected]>
1 parent a08c8d7 commit 9b38509

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+202
-2
lines changed

cores/arduino/stm32/LL/stm32yyxx_ll.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#ifndef _STM32YYXX_LL_H_
22
#define _STM32YYXX_LL_H_
3-
4-
/* Include Low Layers drivers */
53
/* LL raised several warnings, ignore them */
64
#pragma GCC diagnostic push
75
#pragma GCC diagnostic ignored "-Wunused-parameter"
86
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
7+
8+
/* Include Low Layers drivers */
99
#include "stm32yyxx_ll_adc.h"
1010
#include "stm32yyxx_ll_bdma.h"
1111
#include "stm32yyxx_ll_bus.h"

cores/arduino/stm32/LL/stm32yyxx_ll_adc.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_ADC_H_
22
#define _STM32YYXX_LL_ADC_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F0xx
59
#include "stm32f0xx_ll_adc.h"
@@ -37,4 +41,5 @@
3741
#ifdef STM32WBxx
3842
#include "stm32wbxx_ll_adc.h"
3943
#endif
44+
#pragma GCC diagnostic pop
4045
#endif /* _STM32YYXX_LL_ADC_H_ */
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#ifndef _STM32YYXX_LL_BDMA_H_
22
#define _STM32YYXX_LL_BDMA_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32H7xx
59
#include "stm32h7xx_ll_bdma.h"
610
#endif
11+
#pragma GCC diagnostic pop
712
#endif /* _STM32YYXX_LL_BDMA_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_bus.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_BUS_H_
22
#define _STM32YYXX_LL_BUS_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F0xx
59
#include "stm32f0xx_ll_bus.h"
@@ -37,4 +41,5 @@
3741
#ifdef STM32WBxx
3842
#include "stm32wbxx_ll_bus.h"
3943
#endif
44+
#pragma GCC diagnostic pop
4045
#endif /* _STM32YYXX_LL_BUS_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_comp.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_COMP_H_
22
#define _STM32YYXX_LL_COMP_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F0xx
59
#include "stm32f0xx_ll_comp.h"
@@ -25,4 +29,5 @@
2529
#ifdef STM32WBxx
2630
#include "stm32wbxx_ll_comp.h"
2731
#endif
32+
#pragma GCC diagnostic pop
2833
#endif /* _STM32YYXX_LL_COMP_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_cortex.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_CORTEX_H_
22
#define _STM32YYXX_LL_CORTEX_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F0xx
59
#include "stm32f0xx_ll_cortex.h"
@@ -37,4 +41,5 @@
3741
#ifdef STM32WBxx
3842
#include "stm32wbxx_ll_cortex.h"
3943
#endif
44+
#pragma GCC diagnostic pop
4045
#endif /* _STM32YYXX_LL_CORTEX_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_crc.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_CRC_H_
22
#define _STM32YYXX_LL_CRC_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F0xx
59
#include "stm32f0xx_ll_crc.h"
@@ -37,4 +41,5 @@
3741
#ifdef STM32WBxx
3842
#include "stm32wbxx_ll_crc.h"
3943
#endif
44+
#pragma GCC diagnostic pop
4045
#endif /* _STM32YYXX_LL_CRC_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_crs.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_CRS_H_
22
#define _STM32YYXX_LL_CRS_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F0xx
59
#include "stm32f0xx_ll_crs.h"
@@ -13,4 +17,5 @@
1317
#ifdef STM32WBxx
1418
#include "stm32wbxx_ll_crs.h"
1519
#endif
20+
#pragma GCC diagnostic pop
1621
#endif /* _STM32YYXX_LL_CRS_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_dac.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_DAC_H_
22
#define _STM32YYXX_LL_DAC_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F0xx
59
#include "stm32f0xx_ll_dac.h"
@@ -34,4 +38,5 @@
3438
#ifdef STM32L4xx
3539
#include "stm32l4xx_ll_dac.h"
3640
#endif
41+
#pragma GCC diagnostic pop
3742
#endif /* _STM32YYXX_LL_DAC_H_ */
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#ifndef _STM32YYXX_LL_DELAYBLOCK_H_
22
#define _STM32YYXX_LL_DELAYBLOCK_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32H7xx
59
#include "stm32h7xx_ll_delayblock.h"
610
#endif
11+
#pragma GCC diagnostic pop
712
#endif /* _STM32YYXX_LL_DELAYBLOCK_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_dma.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_DMA_H_
22
#define _STM32YYXX_LL_DMA_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F0xx
59
#include "stm32f0xx_ll_dma.h"
@@ -37,4 +41,5 @@
3741
#ifdef STM32WBxx
3842
#include "stm32wbxx_ll_dma.h"
3943
#endif
44+
#pragma GCC diagnostic pop
4045
#endif /* _STM32YYXX_LL_DMA_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_dma2d.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_DMA2D_H_
22
#define _STM32YYXX_LL_DMA2D_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F4xx
59
#include "stm32f4xx_ll_dma2d.h"
@@ -13,4 +17,5 @@
1317
#ifdef STM32L4xx
1418
#include "stm32l4xx_ll_dma2d.h"
1519
#endif
20+
#pragma GCC diagnostic pop
1621
#endif /* _STM32YYXX_LL_DMA2D_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_dmamux.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_DMAMUX_H_
22
#define _STM32YYXX_LL_DMAMUX_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32G0xx
59
#include "stm32g0xx_ll_dmamux.h"
@@ -13,4 +17,5 @@
1317
#ifdef STM32WBxx
1418
#include "stm32wbxx_ll_dmamux.h"
1519
#endif
20+
#pragma GCC diagnostic pop
1621
#endif /* _STM32YYXX_LL_DMAMUX_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_exti.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_EXTI_H_
22
#define _STM32YYXX_LL_EXTI_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F0xx
59
#include "stm32f0xx_ll_exti.h"
@@ -37,4 +41,5 @@
3741
#ifdef STM32WBxx
3842
#include "stm32wbxx_ll_exti.h"
3943
#endif
44+
#pragma GCC diagnostic pop
4045
#endif /* _STM32YYXX_LL_EXTI_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_fmc.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_FMC_H_
22
#define _STM32YYXX_LL_FMC_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F3xx
59
#include "stm32f3xx_ll_fmc.h"
@@ -16,4 +20,5 @@
1620
#ifdef STM32L4xx
1721
#include "stm32l4xx_ll_fmc.h"
1822
#endif
23+
#pragma GCC diagnostic pop
1924
#endif /* _STM32YYXX_LL_FMC_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_fsmc.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_FSMC_H_
22
#define _STM32YYXX_LL_FSMC_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F1xx
59
#include "stm32f1xx_ll_fsmc.h"
@@ -13,4 +17,5 @@
1317
#ifdef STM32L1xx
1418
#include "stm32l1xx_ll_fsmc.h"
1519
#endif
20+
#pragma GCC diagnostic pop
1621
#endif /* _STM32YYXX_LL_FSMC_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_gpio.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_GPIO_H_
22
#define _STM32YYXX_LL_GPIO_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F0xx
59
#include "stm32f0xx_ll_gpio.h"
@@ -37,4 +41,5 @@
3741
#ifdef STM32WBxx
3842
#include "stm32wbxx_ll_gpio.h"
3943
#endif
44+
#pragma GCC diagnostic pop
4045
#endif /* _STM32YYXX_LL_GPIO_H_ */
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#ifndef _STM32YYXX_LL_HRTIM_H_
22
#define _STM32YYXX_LL_HRTIM_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F3xx
59
#include "stm32f3xx_ll_hrtim.h"
610
#endif
711
#ifdef STM32H7xx
812
#include "stm32h7xx_ll_hrtim.h"
913
#endif
14+
#pragma GCC diagnostic pop
1015
#endif /* _STM32YYXX_LL_HRTIM_H_ */
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#ifndef _STM32YYXX_LL_HSEM_H_
22
#define _STM32YYXX_LL_HSEM_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32H7xx
59
#include "stm32h7xx_ll_hsem.h"
610
#endif
711
#ifdef STM32WBxx
812
#include "stm32wbxx_ll_hsem.h"
913
#endif
14+
#pragma GCC diagnostic pop
1015
#endif /* _STM32YYXX_LL_HSEM_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_i2c.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_I2C_H_
22
#define _STM32YYXX_LL_I2C_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F0xx
59
#include "stm32f0xx_ll_i2c.h"
@@ -37,4 +41,5 @@
3741
#ifdef STM32WBxx
3842
#include "stm32wbxx_ll_i2c.h"
3943
#endif
44+
#pragma GCC diagnostic pop
4045
#endif /* _STM32YYXX_LL_I2C_H_ */
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#ifndef _STM32YYXX_LL_IPCC_H_
22
#define _STM32YYXX_LL_IPCC_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32WBxx
59
#include "stm32wbxx_ll_ipcc.h"
610
#endif
11+
#pragma GCC diagnostic pop
712
#endif /* _STM32YYXX_LL_IPCC_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_iwdg.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_IWDG_H_
22
#define _STM32YYXX_LL_IWDG_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F0xx
59
#include "stm32f0xx_ll_iwdg.h"
@@ -37,4 +41,5 @@
3741
#ifdef STM32WBxx
3842
#include "stm32wbxx_ll_iwdg.h"
3943
#endif
44+
#pragma GCC diagnostic pop
4045
#endif /* _STM32YYXX_LL_IWDG_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_lptim.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_LPTIM_H_
22
#define _STM32YYXX_LL_LPTIM_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32F4xx
59
#include "stm32f4xx_ll_lptim.h"
@@ -22,4 +26,5 @@
2226
#ifdef STM32WBxx
2327
#include "stm32wbxx_ll_lptim.h"
2428
#endif
29+
#pragma GCC diagnostic pop
2530
#endif /* _STM32YYXX_LL_LPTIM_H_ */

cores/arduino/stm32/LL/stm32yyxx_ll_lpuart.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#ifndef _STM32YYXX_LL_LPUART_H_
22
#define _STM32YYXX_LL_LPUART_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32G0xx
59
#include "stm32g0xx_ll_lpuart.h"
@@ -16,4 +20,5 @@
1620
#ifdef STM32WBxx
1721
#include "stm32wbxx_ll_lpuart.h"
1822
#endif
23+
#pragma GCC diagnostic pop
1924
#endif /* _STM32YYXX_LL_LPUART_H_ */
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#ifndef _STM32YYXX_LL_MDMA_H_
22
#define _STM32YYXX_LL_MDMA_H_
3+
/* LL raised several warnings, ignore them */
4+
#pragma GCC diagnostic push
5+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
37

48
#ifdef STM32H7xx
59
#include "stm32h7xx_ll_mdma.h"
610
#endif
11+
#pragma GCC diagnostic pop
712
#endif /* _STM32YYXX_LL_MDMA_H_ */

0 commit comments

Comments
 (0)