summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-10-10 10:26:50 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-10-10 10:28:04 +0200
commit1c1b08251fd4753859cf06813dc51b2d1c66c9de (patch)
tree61d1e314b41074ac9076e01f6f8402d147c14682
parent9e34ce09fd1a9b032519e4535db18af2d0e06483 (diff)
downloadrtems-1c1b08251fd4753859cf06813dc51b2d1c66c9de.tar.bz2
shell/lsof: Fix warnings
-rw-r--r--cpukit/libmisc/shell/main_lsof.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/cpukit/libmisc/shell/main_lsof.c b/cpukit/libmisc/shell/main_lsof.c
index 8496be17cc..1de2367351 100644
--- a/cpukit/libmisc/shell/main_lsof.c
+++ b/cpukit/libmisc/shell/main_lsof.c
@@ -1,8 +1,8 @@
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012-2014 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
- * Obere Lagerstr. 30
+ * Dornierstr. 4
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
@@ -17,6 +17,7 @@
#endif
#include <stdio.h>
+#include <inttypes.h>
#include <rtems/libio_.h>
#include <rtems/shell.h>
@@ -39,14 +40,14 @@ static void lsof(void)
fprintf(
stdout,
- "%c %c %s %s -> %s root 0x%08x -> 0x%08x\n",
+ "%c %c %s %s -> %s root 0x%08" PRIxPTR " -> 0x%08" PRIxPTR "\n",
mt_entry->mounted ? 'M' : 'U',
mt_entry->writeable ? 'W' : 'R',
mt_entry->type,
mt_entry->target,
mt_entry->dev == NULL ? "none" : mt_entry->dev,
- (unsigned)mt_entry->mt_fs_root,
- (unsigned)mt_entry->mt_fs_root->location.node_access
+ (uintptr_t) mt_entry->mt_fs_root,
+ (uintptr_t) mt_entry->mt_fs_root->location.node_access
);
for (
@@ -59,9 +60,9 @@ static void lsof(void)
fprintf(
stdout,
- "\t0x%08x -> 0x%08x\n",
- (unsigned)loc,
- (unsigned)loc->node_access
+ "\t0x%08" PRIxPTR " -> 0x%08" PRIxPTR "\n",
+ (uintptr_t) loc,
+ (uintptr_t) loc->node_access
);
}
}