From e5ee8f74702a378129d12bbbd82ddbf0a7bac82e Mon Sep 17 00:00:00 2001 From: xuxin19 Date: Mon, 11 Sep 2023 18:14:34 +0800 Subject: [PATCH] Fix error: procfs/fs_procfscritmon.c:184:10: error: variable 'remaining' set but not used [-Werror,-Wunused-but-set-variable] Signed-off-by: xuxin19 --- fs/procfs/fs_procfscritmon.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/procfs/fs_procfscritmon.c b/fs/procfs/fs_procfscritmon.c index 427e0b8df9..02a92cee38 100644 --- a/fs/procfs/fs_procfscritmon.c +++ b/fs/procfs/fs_procfscritmon.c @@ -181,12 +181,10 @@ static ssize_t critmon_read_cpu(FAR struct critmon_file_s *attr, FAR off_t *offset, int cpu) { struct timespec maxtime; - size_t remaining; size_t linesize; size_t copysize; size_t totalsize; - remaining = buflen; totalsize = 0; /* Convert the for maximum time pre-emption disabled */ @@ -214,7 +212,6 @@ static ssize_t critmon_read_cpu(FAR struct critmon_file_s *attr, totalsize += copysize; buffer += copysize; - remaining -= copysize; if (totalsize >= buflen) {