From 7bde91bd5fd20e2c0c91193728c793e0675bdc03 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 10 Jan 2019 09:05:49 +0100 Subject: Fix format warnings due to ino_t changes --- cpukit/libmisc/shell/main_rm.c | 6 ++++-- cpukit/libmisc/shell/print-ls.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'cpukit/libmisc/shell') diff --git a/cpukit/libmisc/shell/main_rm.c b/cpukit/libmisc/shell/main_rm.c index c8dabe73f4..ab712d59f9 100644 --- a/cpukit/libmisc/shell/main_rm.c +++ b/cpukit/libmisc/shell/main_rm.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD: src/bin/rm/rm.c,v 1.58 2006/10/31 02:22:36 delphij Exp $"); #endif #include +#include #include #include #define __need_getopt_newlib @@ -493,8 +494,9 @@ rm_overwrite_rm(rtems_shell_rm_globals* globals, char *file, struct stat *sbp) if (!S_ISREG(sbp->st_mode)) return (1); if (sbp->st_nlink > 1 && !fflag) { - warnx("%s (inode %lu): not overwritten due to multiple links", - file, sbp->st_ino); + warnx("%s (inode %" PRIuino_t + "): not overwritten due to multiple links", file, + sbp->st_ino); return (0); } if ((fd = open(file, O_WRONLY, 0)) == -1) diff --git a/cpukit/libmisc/shell/print-ls.c b/cpukit/libmisc/shell/print-ls.c index 75876b7a7d..15702b4931 100644 --- a/cpukit/libmisc/shell/print-ls.c +++ b/cpukit/libmisc/shell/print-ls.c @@ -50,6 +50,7 @@ __RCSID("$NetBSD: print.c,v 1.40 2004/11/17 17:00:00 mycroft Exp $"); #include #include +#include #include #include @@ -135,7 +136,8 @@ printlong(rtems_shell_ls_globals* globals, DISPLAY *dp) continue; sp = p->fts_statp; if (f_inode) - (void)printf("%*lu ", dp->s_inode, sp->st_ino); + (void)printf("%*" PRIuino_t " ", dp->s_inode, + sp->st_ino); if (f_size && !f_humanize) { (void)printf("%*llu ", dp->s_block, (unsigned long long)howmany(sp->st_blocks, blocksize)); @@ -385,7 +387,7 @@ printaname(rtems_shell_ls_globals* globals, sp = p->fts_statp; chcnt = 0; if (f_inode) - chcnt += printf("%*lu ", inodefield, sp->st_ino); + chcnt += printf("%*" PRIuino_t " ", inodefield, sp->st_ino); if (f_size) { #if RTEMS_REMOVED if (f_humanize) { -- cgit v1.2.3