From c1a3b457554eea79c97dd9c3481a2fd14d93e420 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Mon, 16 May 2016 20:03:11 +1000 Subject: [PATCH] vmstat: sys variables are unsigned longs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- vmstat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vmstat.c b/vmstat.c index 51dae285..35a4f57f 100644 --- 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); -- 2.40.0