Skip to content

Commit 4915eb7

Browse files
committed
fix: suppress unused variable warning in AVR test
1 parent 8adfbfe commit 4915eb7

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,20 @@ jobs:
230230
FOR %%P IN (0 1) DO (
231231
echo === MSVC Opt:%%O Pol:%%P ===
232232
FOR %%f IN (*.c) DO (
233-
cl.exe /nologo /W4 /std:c11 /WX /DDEBUG /DESTACK_SAFETY_POLICY=%%P /DESTACK_ASSERT_STAYS %%O /I.. /Fe:%%~nf.exe %%f
234-
if !errorlevel! neq 0 (
235-
echo [FAIL] Compile %%f
236-
set FAILED=1
237-
) else (
238-
echo [Running] %%~nf.exe
239-
%%~nf.exe
233+
if not "%%f"=="avr_test.c" (
234+
cl.exe /nologo /W4 /std:c11 /WX /DDEBUG /DESTACK_SAFETY_POLICY=%%P /DESTACK_ASSERT_STAYS %%O /I.. /Fe:%%~nf.exe %%f
240235
if !errorlevel! neq 0 (
241-
echo [FAIL] Run %%f
236+
echo [FAIL] Compile %%f
242237
set FAILED=1
243238
) else (
244-
echo [OK] %%f
239+
echo [Running] %%~nf.exe
240+
%%~nf.exe
241+
if !errorlevel! neq 0 (
242+
echo [FAIL] Run %%f
243+
set FAILED=1
244+
) else (
245+
echo [OK] %%f
246+
)
245247
)
246248
)
247249
)

tests/avr_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ int main(void) {
4444

4545
void *t2 = estack_alloc(stack, 16);
4646
avr_assert(estack_get_meta_index(stack) == 2);
47+
(void)t2; // Suppress unused variable warning
4748

4849
estack_free_to_marker(stack, marker);
4950
avr_assert(estack_get_meta_index(stack) == 1);

0 commit comments

Comments
 (0)