]> granicus.if.org Git - procps-ng/commitdiff
vmstat: sys variables are unsigned longs
authorCraig Small <csmall@dropbear.xyz>
Mon, 16 May 2016 10:03:11 +0000 (20:03 +1000)
committerCraig Small <csmall@dropbear.xyz>
Mon, 16 May 2016 10:03:11 +0000 (20:03 +1000)
When the API changed for the use_format the type changed for the
system variables out of stat, but the printf format was not changed
along with it.

vmstat.c:868:14: warning: format ‘%lld’ expects argument of type ‘long
long int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
     printf(_("%13lld interrupts\n"), SYSv(sstat_INT));

References:
 commit 2e6435a39dd8260462652b999c1bb45e15ae0d62

Signed-off-by: Craig Small <csmall@dropbear.xyz>
vmstat.c

index 51dae2853b347e27198f7aac312ec06d94c8e2a2..35a4f57f8f43966e69b36333f1b8916a8062600d 100644 (file)
--- a/vmstat.c
+++ b/vmstat.c
@@ -865,10 +865,10 @@ static void sum_format(void)
     printf(_("%13lu pages paged out\n"), procps_vmstat_get(vm_info, PROCPS_VMSTAT_PGPGOUT));
     printf(_("%13lu pages swapped in\n"), procps_vmstat_get(vm_info, PROCPS_VMSTAT_PSWPIN));
     printf(_("%13lu pages swapped out\n"), procps_vmstat_get(vm_info, PROCPS_VMSTAT_PSWPOUT));
-    printf(_("%13lld interrupts\n"), SYSv(sstat_INT));
-    printf(_("%13lld CPU context switches\n"), SYSv(sstat_CTX));
-    printf(_("%13lld boot time\n"), SYSv(sstat_TOB));
-    printf(_("%13lld forks\n"), SYSv(sstat_PCR));
+    printf(_("%13lu interrupts\n"), SYSv(sstat_INT));
+    printf(_("%13lu CPU context switches\n"), SYSv(sstat_CTX));
+    printf(_("%13lu boot time\n"), SYSv(sstat_TOB));
+    printf(_("%13lu forks\n"), SYSv(sstat_PCR));
 
     /* Cleanup */
     procps_stat_unref(&sys_info);