Просмотр исходного кода

[HAL][EXTI] Add UNUSED() macro to avoid the generation of a warning related to the unused argument 'Edge'

Rania JMAI 2 лет назад
Родитель
Сommit
dffbe9c23c
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      Src/stm32f4xx_hal_exti.c

+ 6 - 0
Src/stm32f4xx_hal_exti.c

@@ -469,6 +469,9 @@ uint32_t HAL_EXTI_GetPending(EXTI_HandleTypeDef *hexti, uint32_t Edge)
   uint32_t linepos;
   uint32_t maskline;
 
+  /* Prevent unused argument(s) compilation warning */
+  UNUSED(Edge);
+
   /* Check parameters */
   assert_param(IS_EXTI_LINE(hexti->Line));
   assert_param(IS_EXTI_CONFIG_LINE(hexti->Line));
@@ -496,6 +499,9 @@ void HAL_EXTI_ClearPending(EXTI_HandleTypeDef *hexti, uint32_t Edge)
 {
   uint32_t maskline;
 
+  /* Prevent unused argument(s) compilation warning */
+  UNUSED(Edge);
+
   /* Check parameters */
   assert_param(IS_EXTI_LINE(hexti->Line));
   assert_param(IS_EXTI_CONFIG_LINE(hexti->Line));