Skip to content

Commit

Permalink
fix: prevent unused warning
Browse files Browse the repository at this point in the history
When NDEBUG is defined and the _Error_Handler() is used
inside a function using function arguments.

Ex:
void dummy(char *file, uint32_t line) {
  _Error_Handler(file, line);
}

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
  • Loading branch information
fpistm committed May 28, 2024
1 parent 000dad7 commit 5388978
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cores/arduino/stm32/stm32_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ void SystemClock_Config(void);
#if !defined(_Error_Handler)
#define _Error_Handler(str, value) \
while (1) {\
(void)str;\
(void)value;\
}
#endif
#if !defined(Error_Handler)
Expand Down

0 comments on commit 5388978

Please sign in to comment.