summaryrefslogtreecommitdiff
path: root/bin/rdsquashfs/describe.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-06-25 14:30:31 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-06-25 17:49:36 +0200
commit4d0a62805708a6d3fe21f615ccfaa3964adbf259 (patch)
tree7c46d9c0764d2c18368644815800eabea630211a /bin/rdsquashfs/describe.c
parentc578e5ca80370c9fc832f4a535bd8444971759e0 (diff)
Fix format string type/signedness mismatch issues
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin/rdsquashfs/describe.c')
-rw-r--r--bin/rdsquashfs/describe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/rdsquashfs/describe.c b/bin/rdsquashfs/describe.c
index 5107f95..e0e22bc 100644
--- a/bin/rdsquashfs/describe.c
+++ b/bin/rdsquashfs/describe.c
@@ -53,7 +53,8 @@ static int print_name(const sqfs_tree_node_t *n, bool dont_escape)
static void print_perm(const sqfs_tree_node_t *n)
{
- printf(" 0%o %d %d", n->inode->base.mode & (~S_IFMT), n->uid, n->gid);
+ printf(" 0%o %u %u", (unsigned int)n->inode->base.mode & (~S_IFMT),
+ n->uid, n->gid);
}
static int print_simple(const char *type, const sqfs_tree_node_t *n,
@@ -112,7 +113,7 @@ int describe_tree(const sqfs_tree_node_t *root, const char *unpack_root)
devno = root->inode->data.dev.devno;
}
- sprintf(buffer, "%c %d %d",
+ sprintf(buffer, "%c %u %u",
S_ISCHR(root->inode->base.mode) ? 'c' : 'b',
major(devno), minor(devno));
return print_simple("nod", root, buffer);