Skip to content

Commit

Permalink
Fix UNUSED macro in STM32 HAL
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Williamson authored and Gadgetoid committed Feb 11, 2020
1 parent efabdbd commit a92b87d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ typedef enum
(__DMA_HANDLE__).Parent = (__HANDLE__); \
} while(0)

#define UNUSED(x) ((void)(x))
#define UNUSED(x) ((void)(__typeof__(x))(x)) // suppress "UNUSED" warnings

/** @brief Reset the Handle's State field.
* @param __HANDLE__: specifies the Peripheral Handle.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static const uint8_t LL_BDMA_CH_OFFSET_TAB[] =
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
#if !defined(UNUSED)
#define UNUSED(x) ((void)(x))
#define UNUSED(x) ((void)(__typeof__(x))(x)) // suppress "UNUSED" warnings
#endif

/* Exported types ------------------------------------------------------------*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extern const uint8_t LL_RCC_PrescTable[16];
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
#if !defined(UNUSED)
#define UNUSED(x) ((void)(x))
#define UNUSED(x) ((void)(__typeof__(x))(x)) // suppress "UNUSED" warnings
#endif

/* 32 24 16 8 0
Expand Down

0 comments on commit a92b87d

Please sign in to comment.