]> granicus.if.org Git - procps-ng/commitdiff
library: eliminate warning '-Wunused-but-set-variable'
authorJim Warner <james.warner@comcast.net>
Sun, 2 Jan 2022 06:00:09 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Fri, 7 Jan 2022 08:19:15 +0000 (19:19 +1100)
Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/readproc.c

index b4127b411e67699a55c2441b567305a012f7b693..feda54b7f6d1bb5c04f08b30dee5bd09e2c301bc 100644 (file)
@@ -641,8 +641,7 @@ static void statm2proc(const char *s, proc_t *restrict P) {
 }
 
 static void io2proc(const char *s, proc_t *restrict P) {
-    int num;
-    num = sscanf(s, "rchar: %lu wchar: %lu syscr: %lu syscw: %lu read_bytes: %lu write_bytes: %lu cancelled_write_bytes: %lu",
+    sscanf(s, "rchar: %lu wchar: %lu syscr: %lu syscw: %lu read_bytes: %lu write_bytes: %lu cancelled_write_bytes: %lu",
             &P->rchar, &P->wchar, &P->syscr,
             &P->syscw, &P->read_bytes, &P->write_bytes, &P->cancelled_write_bytes);
 }