Skip to content

Commit e4b169a

Browse files
authored
Merge pull request #10 from blckmn/warning_removal
Removed Warnings from lib
2 parents 1d1ab87 + 814a532 commit e4b169a

10 files changed

+45
-0
lines changed

lib/main/STM32F0/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_adc.h

+1
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,7 @@ typedef struct
14261426
*/
14271427
__STATIC_INLINE uint32_t LL_ADC_DMA_GetRegAddr(ADC_TypeDef *ADCx, uint32_t Register)
14281428
{
1429+
UNUSED(Register);
14291430
/* Retrieve address of register DR */
14301431
return (uint32_t)&(ADCx->DR);
14311432
}

lib/main/STM32F0/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_crc.h

+10
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ extern "C" {
4848
* @{
4949
*/
5050

51+
/* ignore some GCC warnings */
52+
#if defined ( __GNUC__ )
53+
#pragma GCC diagnostic push
54+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
55+
#endif
56+
5157
#if defined(CRC)
5258

5359
/** @defgroup CRC_LL CRC
@@ -492,6 +498,10 @@ ErrorStatus LL_CRC_DeInit(CRC_TypeDef *CRCx);
492498
* @}
493499
*/
494500

501+
#if defined ( __GNUC__ )
502+
#pragma GCC diagnostic pop
503+
#endif
504+
495505
#ifdef __cplusplus
496506
}
497507
#endif

lib/main/STM32F0/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_iwdg.h

+4
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ extern "C" {
160160
*/
161161
__STATIC_INLINE void LL_IWDG_Enable(IWDG_TypeDef *IWDGx)
162162
{
163+
UNUSED(IWDGx);
163164
WRITE_REG(IWDG->KR, LL_IWDG_KEY_ENABLE);
164165
}
165166

@@ -171,6 +172,7 @@ __STATIC_INLINE void LL_IWDG_Enable(IWDG_TypeDef *IWDGx)
171172
*/
172173
__STATIC_INLINE void LL_IWDG_ReloadCounter(IWDG_TypeDef *IWDGx)
173174
{
175+
UNUSED(IWDGx);
174176
WRITE_REG(IWDG->KR, LL_IWDG_KEY_RELOAD);
175177
}
176178

@@ -182,6 +184,7 @@ __STATIC_INLINE void LL_IWDG_ReloadCounter(IWDG_TypeDef *IWDGx)
182184
*/
183185
__STATIC_INLINE void LL_IWDG_EnableWriteAccess(IWDG_TypeDef *IWDGx)
184186
{
187+
UNUSED(IWDGx);
185188
WRITE_REG(IWDG->KR, LL_IWDG_KEY_WR_ACCESS_ENABLE);
186189
}
187190

@@ -193,6 +196,7 @@ __STATIC_INLINE void LL_IWDG_EnableWriteAccess(IWDG_TypeDef *IWDGx)
193196
*/
194197
__STATIC_INLINE void LL_IWDG_DisableWriteAccess(IWDG_TypeDef *IWDGx)
195198
{
199+
UNUSED(IWDGx);
196200
WRITE_REG(IWDG->KR, LL_IWDG_KEY_WR_ACCESS_DISABLE);
197201
}
198202

lib/main/STM32F0/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_spi.h

+9
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
extern "C" {
4242
#endif
4343

44+
#if defined ( __GNUC__ )
45+
#pragma GCC diagnostic push
46+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
47+
#endif
48+
4449
/* Includes ------------------------------------------------------------------*/
4550
#include "stm32f0xx.h"
4651

@@ -2284,6 +2289,10 @@ void LL_I2S_ConfigPrescaler(SPI_TypeDef *SPIx, uint32_t PrescalerLinear,
22842289
* @}
22852290
*/
22862291

2292+
#if defined ( __GNUC__ )
2293+
#pragma GCC diagnostic pop
2294+
#endif
2295+
22872296
#ifdef __cplusplus
22882297
}
22892298
#endif

lib/main/STM32F0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c

+2
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@
151151
*/
152152
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
153153
{
154+
UNUSED(SubPriority);
155+
154156
/* Check the parameters */
155157
assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
156158
NVIC_SetPriority(IRQn,PreemptPriority);

lib/main/STM32F0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c

+2
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
284284
*/
285285
void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
286286
{
287+
UNUSED(Regulator);
288+
287289
/* Check the parameters */
288290
assert_param(IS_PWR_REGULATOR(Regulator));
289291
assert_param(IS_PWR_SLEEP_ENTRY(SLEEPEntry));

lib/main/STM32F0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c

+3
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,9 @@ HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, ui
984984
#endif
985985
void HAL_RCC_MCOConfig(uint32_t RCC_MCOx, uint32_t RCC_MCOSource, uint32_t RCC_MCODiv)
986986
{
987+
UNUSED(RCC_MCODiv);
988+
UNUSED(RCC_MCOx);
989+
987990
GPIO_InitTypeDef gpio;
988991

989992
/* Check the parameters */

lib/main/STM32F0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c

+8
Original file line numberDiff line numberDiff line change
@@ -2081,6 +2081,8 @@ __weak void HAL_TIM_OnePulse_MspDeInit(TIM_HandleTypeDef *htim)
20812081
*/
20822082
HAL_StatusTypeDef HAL_TIM_OnePulse_Start(TIM_HandleTypeDef *htim, uint32_t OutputChannel)
20832083
{
2084+
UNUSED(OutputChannel);
2085+
20842086
/* Enable the Capture compare and the Input Capture channels
20852087
(in the OPM Mode the two possible channels that can be used are TIM_CHANNEL_1 and TIM_CHANNEL_2)
20862088
if TIM_CHANNEL_1 is used as output, the TIM_CHANNEL_2 will be used as input and
@@ -2114,6 +2116,8 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_Start(TIM_HandleTypeDef *htim, uint32_t Outpu
21142116
*/
21152117
HAL_StatusTypeDef HAL_TIM_OnePulse_Stop(TIM_HandleTypeDef *htim, uint32_t OutputChannel)
21162118
{
2119+
UNUSED(OutputChannel);
2120+
21172121
/* Disable the Capture compare and the Input Capture channels
21182122
(in the OPM Mode the two possible channels that can be used are TIM_CHANNEL_1 and TIM_CHANNEL_2)
21192123
if TIM_CHANNEL_1 is used as output, the TIM_CHANNEL_2 will be used as input and
@@ -2147,6 +2151,8 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_Stop(TIM_HandleTypeDef *htim, uint32_t Output
21472151
*/
21482152
HAL_StatusTypeDef HAL_TIM_OnePulse_Start_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel)
21492153
{
2154+
UNUSED(OutputChannel);
2155+
21502156
/* Enable the Capture compare and the Input Capture channels
21512157
(in the OPM Mode the two possible channels that can be used are TIM_CHANNEL_1 and TIM_CHANNEL_2)
21522158
if TIM_CHANNEL_1 is used as output, the TIM_CHANNEL_2 will be used as input and
@@ -2186,6 +2192,8 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_Start_IT(TIM_HandleTypeDef *htim, uint32_t Ou
21862192
*/
21872193
HAL_StatusTypeDef HAL_TIM_OnePulse_Stop_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel)
21882194
{
2195+
UNUSED(OutputChannel);
2196+
21892197
/* Disable the TIM Capture/Compare 1 interrupt */
21902198
__HAL_TIM_DISABLE_IT(htim, TIM_IT_CC1);
21912199

lib/main/STM32F0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_adc.c

+2
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@
184184
*/
185185
ErrorStatus LL_ADC_CommonDeInit(ADC_Common_TypeDef *ADCxy_COMMON)
186186
{
187+
UNUSED(ADCxy_COMMON);
188+
187189
/* Check the parameters */
188190
assert_param(IS_ADC_COMMON_INSTANCE(ADCxy_COMMON));
189191

lib/main/STM32F0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dac.c

+4
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@
153153
*/
154154
ErrorStatus LL_DAC_DeInit(DAC_TypeDef *DACx)
155155
{
156+
UNUSED(DACx);
157+
156158
/* Check the parameters */
157159
assert_param(IS_DAC_ALL_INSTANCE(DACx));
158160

@@ -184,6 +186,8 @@ ErrorStatus LL_DAC_DeInit(DAC_TypeDef *DACx)
184186
*/
185187
ErrorStatus LL_DAC_Init(DAC_TypeDef *DACx, uint32_t DAC_Channel, LL_DAC_InitTypeDef *DAC_InitStruct)
186188
{
189+
UNUSED(DAC_InitStruct);
190+
187191
ErrorStatus status = SUCCESS;
188192

189193
/* Check the parameters */

0 commit comments

Comments
 (0)