mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
remove "deprecated 'register'" warning with clang (#6607)
This commit is contained in:
parent
f556b77894
commit
21f66f5208
1 changed files with 17 additions and 12 deletions
|
@ -26,7 +26,17 @@
|
||||||
|
|
||||||
#if defined(LUA_EXPORT_GENERATION)
|
#if defined(LUA_EXPORT_GENERATION)
|
||||||
// no includes
|
// no includes
|
||||||
#elif defined(STM32F4)
|
#else
|
||||||
|
|
||||||
|
#if __clang__
|
||||||
|
// clang is very picky about the use of "register"
|
||||||
|
// Tell clang to ignore the warnings for the following files
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-register"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(STM32F4)
|
||||||
|
|
||||||
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_rcc.h"
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_rcc.h"
|
||||||
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_syscfg.h"
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_syscfg.h"
|
||||||
|
@ -62,22 +72,17 @@
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/misc.h"
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/misc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__cplusplus) && !defined(SIMU)
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __clang__
|
|
||||||
// clang is very picky about the use of "register"
|
|
||||||
// Tell clang to ignore the warnings for the following files
|
|
||||||
#pragma clang diagnostic push
|
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-register"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __clang__
|
#if __clang__
|
||||||
// Restore warnings about registers
|
// Restore warnings about registers
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__cplusplus) && !defined(SIMU)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "usb_driver.h"
|
#include "usb_driver.h"
|
||||||
|
|
||||||
#if !defined(SIMU)
|
#if !defined(SIMU)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue