Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suppress (don't fix) compiler warnings for 3rd party libraries - STM32F4 and STM32F7 #978

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,8 @@ void I2S_Init(SPI_TypeDef* SPIx, I2S_InitTypeDef* I2S_InitStruct)
/* Get the PLLM value */
pllm = (uint32_t)(RCC->PLLCFGR & RCC_PLLCFGR_PLLM);

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wduplicated-branches"
if((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)
{
/* Get the I2S source clock value */
Expand All @@ -433,6 +435,7 @@ void I2S_Init(SPI_TypeDef* SPIx, I2S_InitTypeDef* I2S_InitStruct)
i2sclk = (uint32_t)(((HSI_VALUE / pllm) * plln) / pllr);
}
#endif /* I2S_EXTERNAL_CLOCK_VAL */
#pragma GCC diagnostic pop

/* Compute the Real divider depending on the MCLK output state, with a floating point */
if(I2S_InitStruct->I2S_MCLKOutput == I2S_MCLKOutput_Enable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart)
return HAL_ERROR;
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wduplicated-branches"
if(huart->Init.HwFlowCtl != UART_HWCONTROL_NONE)
{
/* Check the parameters */
Expand All @@ -258,6 +260,7 @@ HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart)
/* Check the parameters */
assert_param(IS_UART_INSTANCE(huart->Instance));
}
#pragma GCC diagnostic pop

if(huart->gState == HAL_UART_STATE_RESET)
{
Expand Down
Loading