From ce4e691a01338b6708586421530c645f6a9d60d9 Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Mon, 16 Mar 2015 13:01:37 -0400 Subject: shell: fix printf warnings --- cpukit/libmisc/shell/main_df.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cpukit/libmisc/shell/main_df.c b/cpukit/libmisc/shell/main_df.c index e6cbd3ccc4..ec0dc7db34 100644 --- a/cpukit/libmisc/shell/main_df.c +++ b/cpukit/libmisc/shell/main_df.c @@ -22,6 +22,7 @@ #define __need_getopt_newlib #include #include +#include static const char suffixes[] = { 'B', 'K', 'M', 'G', 'T' }; @@ -83,12 +84,12 @@ static bool rtems_shell_df_print_entry( if (context->block_size > 0) { - printf("%-15s %10llu %9llu %11llu %9llu%% %14s\n", + printf("%-15s %10lu %9lu %11lu %9" PRIu64 "%% %14s\n", mt_entry->dev == NULL ? "none" : mt_entry->dev, (svfs.f_blocks * svfs.f_frsize + (context->block_size - 1)) / context->block_size, ((svfs.f_blocks - svfs.f_bfree) * svfs.f_frsize + (context->block_size - 1)) / context->block_size, (svfs.f_bfree * svfs.f_frsize + (context->block_size - 1)) / context->block_size, - ((svfs.f_blocks - svfs.f_bfree) * 100 / svfs.f_blocks), + (uint64_t)((svfs.f_blocks - svfs.f_bfree) * 100 / svfs.f_blocks), mt_entry->target == NULL ? "none" : mt_entry->target); } else @@ -99,9 +100,9 @@ static bool rtems_shell_df_print_entry( u_buf, sizeof(u_buf)); rtems_shell_df_humanize_size(svfs.f_bfree * svfs.f_frsize, a_buf, sizeof(a_buf)); - printf("%-15s %10s %9s %11s %9llu%% %14s\n", + printf("%-15s %10s %9s %11s %9" PRIu64 "%% %14s\n", mt_entry->dev == NULL ? "none" : mt_entry->dev, f_buf, u_buf, a_buf, - (svfs.f_blocks - svfs.f_bfree) * 100 / svfs.f_blocks, + (uint64_t)(svfs.f_blocks - svfs.f_bfree) * 100 / svfs.f_blocks, mt_entry->target == NULL ? "none" : mt_entry->target); } -- cgit v1.2.3