[rtems commit] libmisc: Include missing header file, fix warnings
Sebastian Huber
sebh at rtems.org
Tue Dec 15 07:22:27 UTC 2015
Module: rtems
Branch: master
Commit: 7a0c4854c6abe8665b7e50a3bafebce84e7872a4
Changeset: http://git.rtems.org/rtems/commit/?id=7a0c4854c6abe8665b7e50a3bafebce84e7872a4
Author: Nick Withers <nick.withers at anu.edu.au>
Date: Thu Dec 10 20:04:54 2015 +1100
libmisc: Include missing header file, fix warnings
---
cpukit/libmisc/shell/main_ls.c | 3 ++-
cpukit/libmisc/shell/print-ls.c | 10 +++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/cpukit/libmisc/shell/main_ls.c b/cpukit/libmisc/shell/main_ls.c
index 55ad5b3..e23e388 100644
--- a/cpukit/libmisc/shell/main_ls.c
+++ b/cpukit/libmisc/shell/main_ls.c
@@ -58,6 +58,7 @@ __RCSID("$NetBSD: ls.c,v 1.58 2005/10/26 02:24:22 jschauma Exp $");
#define __need_getopt_newlib
#include <getopt.h>
+#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
@@ -660,7 +661,7 @@ display(rtems_shell_ls_globals* globals, FTSENT *p, FTSENT *list)
d.s_block = 4; /* min buf length for humanize_number */
} else {
(void)snprintf(buf, sizeof(buf), "%llu",
- (long long)howmany(maxblock, blocksize));
+ (unsigned long long)howmany(maxblock, blocksize));
d.s_block = strlen(buf);
}
d.s_flags = maxflags;
diff --git a/cpukit/libmisc/shell/print-ls.c b/cpukit/libmisc/shell/print-ls.c
index e83ed30..5880e6e 100644
--- a/cpukit/libmisc/shell/print-ls.c
+++ b/cpukit/libmisc/shell/print-ls.c
@@ -124,7 +124,7 @@ printlong(rtems_shell_ls_globals* globals, DISPLAY *dp)
} else {
#endif
(void)printf("total %llu\n",
- (long long)(howmany(dp->btotal, blocksize)));
+ (unsigned long long)(howmany(dp->btotal, blocksize)));
#if RTEMS_REMOVED
}
#endif
@@ -138,7 +138,7 @@ printlong(rtems_shell_ls_globals* globals, DISPLAY *dp)
(void)printf("%*lu ", dp->s_inode, sp->st_ino);
if (f_size && !f_humanize) {
(void)printf("%*llu ", dp->s_block,
- (long long)howmany(sp->st_blocks, blocksize));
+ (unsigned long long)howmany(sp->st_blocks, blocksize));
}
(void)strmode(sp->st_mode, buf);
np = p->fts_pointer;
@@ -254,7 +254,7 @@ printcol(rtems_shell_ls_globals* globals, DISPLAY *dp)
} else {
#endif
(void)printf("total %llu\n",
- (long long)(howmany(dp->btotal, blocksize)));
+ (unsigned long long)(howmany(dp->btotal, blocksize)));
#if RTEMS_REMOVED
}
#endif
@@ -313,7 +313,7 @@ printacol(rtems_shell_ls_globals* globals, DISPLAY *dp)
} else {
#endif
(void)printf("total %llu\n",
- (long long)(howmany(dp->btotal, blocksize)));
+ (unsigned long long)(howmany(dp->btotal, blocksize)));
#if RTEMS_REMOVED
}
#endif
@@ -397,7 +397,7 @@ printaname(rtems_shell_ls_globals* globals,
} else {
#endif
chcnt += printf("%*llu ", sizefield,
- (long long)howmany(sp->st_blocks, blocksize));
+ (unsigned long long)howmany(sp->st_blocks, blocksize));
#if RTEMS_REMOVED
}
#endif
More information about the vc
mailing list