summaryrefslogtreecommitdiff
path: root/bin
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 15:12:41 +0200
commit9e345a9846270822d61dd232ec4cc6ca2558a782 (patch)
tree6c1209de631d75ff3cac0920feba3f9f42980fae /bin
parentd4690eeabe557753b394b8f83b5dbaf83e57e15f (diff)
Fix format string type/signedness mismatch issues
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin')
-rw-r--r--bin/rdsquashfs/describe.c5
-rw-r--r--bin/rdsquashfs/stat.c7
2 files changed, 7 insertions, 5 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);
diff --git a/bin/rdsquashfs/stat.c b/bin/rdsquashfs/stat.c
index 642aae9..ae6e10b 100644
--- a/bin/rdsquashfs/stat.c
+++ b/bin/rdsquashfs/stat.c
@@ -99,7 +99,8 @@ int stat_file(const sqfs_tree_node_t *node)
printf("Name: %s\n", (const char *)node->name);
printf("Inode type: %s\n", type == NULL ? "UNKNOWN" : type);
printf("Inode number: %u\n", inode->base.inode_number);
- printf("Access: 0%o\n", inode->base.mode & ~SQFS_INODE_MODE_MASK);
+ printf("Access: 0%o\n",
+ (unsigned int)inode->base.mode & ~SQFS_INODE_MODE_MASK);
printf("UID: %u (index = %u)\n", node->uid, inode->base.uid_idx);
printf("GID: %u (index = %u)\n", node->gid, inode->base.gid_idx);
printf("Last modified: %s (%u)\n", buffer, inode->base.mod_time);
@@ -111,7 +112,7 @@ int stat_file(const sqfs_tree_node_t *node)
printf("Xattr index: 0x%X\n", xattr_idx);
if (link_target != NULL)
- printf("Link target: %.*s\n", link_size, link_target);
+ printf("Link target: %.*s\n", (int)link_size, link_target);
if (have_devno) {
printf("Device number: %u:%u (%u)\n",
@@ -171,7 +172,7 @@ int stat_file(const sqfs_tree_node_t *node)
}
printf("\t'%.*s' -> block %u, header offset %u\n",
- idx->size + 1, idx->name,
+ (int)(idx->size + 1), idx->name,
idx->start_block, idx->index);
sqfs_free(idx);