This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit ba92fb6bc82a43a913f7bdd1dac5d4181cea2186
Author: Marco Casaroli <[email protected]>
AuthorDate: Tue Nov 3 19:06:35 2026 +0100

    fs/procfs: Fix the unused variables in proc_critmon().
    
    With SCHED_CRITMONITOR_MAXTIME_THREAD -1, proc_critmon() does not use
    runtime.  When the THREAD, PREEMPTION, CSECTION and BUSYWAIT monitors
    are all -1, it also does not use maxtime, remaining, linesize and
    copysize.  A build with -Werror then fails.
    
    Mark these variables as unused, as critmon_read_cpu() in
    fs_procfscritmon.c does.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 fs/procfs/fs_procfsproc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c
index 47fcef55f4f..44e51e23a94 100644
--- a/fs/procfs/fs_procfsproc.c
+++ b/fs/procfs/fs_procfsproc.c
@@ -805,6 +805,12 @@ static ssize_t proc_critmon(FAR struct proc_file_s 
*procfile,
   remaining = buflen;
   totalsize = 0;
 
+  UNUSED(maxtime);
+  UNUSED(runtime);
+  UNUSED(remaining);
+  UNUSED(linesize);
+  UNUSED(copysize);
+
   /* Convert the for maximum time pre-emption disabled */
 
 #if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0

Reply via email to