screen: remove warning about unused param
What changed, and why it matters
This is a minor code-quality change that silences a compiler warning about an unused function parameter during testing. It does not change any runtime behavior or fix any security issue.
No security action needed. Treat as routine code hygiene.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds (void)duration; in the TESTING preprocessor branch of screen_print_debug(). In non-test builds, the duration parameter is already used to call delay_ms(). In test builds, that call is compiled out, leaving duration unused and triggering a compiler warning. The cast-to-void idiom suppresses the warning without altering program logic.
Changed components
src/screen.cInspect captured patch +2 / −0
diff --git a/src/screen.c b/src/screen.c
index fa3af69..7a19f5a 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -51,6 +51,8 @@ void screen_print_debug(const char* message, int duration)
UG_SendBuffer();
#ifndef TESTING
if (duration > 0) delay_ms(duration);
+#else
+ (void)duration;
#endif
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.