In my opinion an error check is better. Matteo
On Tue, Feb 24, 2026, 4:34 PM Peter Barada <[email protected]> wrote: > While forcing more warnings for unused function parameters (and trying > to fix them), I'm running across multiple functions passed argc and argv > that ignore argc and dereference argv[]. I could just add an > UNUSED(argc), or should I add a test on argc to be at least the highest > element referenced in argv[]? > > As an example in sched/irq/irq_attach_thread::isr_thread_main, should > the code first check if argc < 5 and if so return ERROR before accessing > elements of argv[]? > > Thanks in advance! > > -- > Peter Barada > [email protected] > >
