summaryrefslogtreecommitdiff
path: root/extras
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 /extras
parentd4690eeabe557753b394b8f83b5dbaf83e57e15f (diff)
Fix format string type/signedness mismatch issues
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'extras')
-rw-r--r--extras/browse.c12
-rw-r--r--extras/list_files.c6
2 files changed, 12 insertions, 6 deletions
diff --git a/extras/browse.c b/extras/browse.c
index d78ac5a..6d03312 100644
--- a/extras/browse.c
+++ b/extras/browse.c
@@ -267,7 +267,8 @@ static void stat_cmd(const char *filename)
printf("Inode number: %u\n", inode->base.inode_number);
mode_to_str(inode->base.mode & ~SQFS_INODE_MODE_MASK, buffer);
- printf("Access: 0%o/%s\n", inode->base.mode & ~SQFS_INODE_MODE_MASK,
+ printf("Access: 0%o/%s\n",
+ (unsigned int)inode->base.mode & ~SQFS_INODE_MODE_MASK,
buffer);
/* resolve and print UID/GID */
@@ -317,13 +318,15 @@ static void stat_cmd(const char *filename)
break;
case SQFS_INODE_SLINK:
printf("Hard link count: %u\n", inode->data.slink.nlink);
- printf("Link target: %.*s\n", inode->data.slink.target_size,
+ printf("Link target: %.*s\n",
+ (int)inode->data.slink.target_size,
(const char *)inode->extra);
break;
case SQFS_INODE_EXT_SLINK:
printf("Hard link count: %u\n", inode->data.slink_ext.nlink);
printf("Xattr index: 0x%X\n", inode->data.slink_ext.xattr_idx);
- printf("Link target: %.*s\n", inode->data.slink_ext.target_size,
+ printf("Link target: %.*s\n",
+ (int)inode->data.slink_ext.target_size,
(const char *)inode->extra);
break;
case SQFS_INODE_FILE:
@@ -398,7 +401,8 @@ static void stat_cmd(const char *filename)
printf("\tIndex: %u\n", idx->index);
printf("\tStart block: %u\n", idx->start_block);
printf("\tSize: %u\n", idx->size + 1);
- printf("\tEntry: %.*s\n\n", idx->size + 1, idx->name);
+ printf("\tEntry: %.*s\n\n",
+ (int)(idx->size + 1), idx->name);
sqfs_free(idx);
}
diff --git a/extras/list_files.c b/extras/list_files.c
index 434601a..5f0742d 100644
--- a/extras/list_files.c
+++ b/extras/list_files.c
@@ -33,10 +33,12 @@ static void write_tree_dfs(const sqfs_tree_node_t *n)
fputs((const char *)n->name, stdout);
if (n->inode->base.type == SQFS_INODE_SLINK) {
- printf(" ⭢ %.*s", n->inode->data.slink.target_size,
+ printf(" ⭢ %.*s",
+ (int)n->inode->data.slink.target_size,
(const char *)n->inode->extra);
} else if (n->inode->base.type == SQFS_INODE_EXT_SLINK) {
- printf(" ⭢ %.*s", n->inode->data.slink_ext.target_size,
+ printf(" ⭢ %.*s",
+ (int)n->inode->data.slink_ext.target_size,
(const char *)n->inode->extra);
}