Skip to content

Commit 5388978

Browse files
committed
fix: prevent unused warning
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>
1 parent 000dad7 commit 5388978

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/arduino/stm32/stm32_def.h

+2
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ void SystemClock_Config(void);
133133
#if !defined(_Error_Handler)
134134
#define _Error_Handler(str, value) \
135135
while (1) {\
136+
(void)str;\
137+
(void)value;\
136138
}
137139
#endif
138140
#if !defined(Error_Handler)

0 commit comments

Comments
 (0)