Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

Commit

Permalink
dosfstools: Fix compile error in Pie tree on 32 bit systems
Browse files Browse the repository at this point in the history
Fixes the following compile error:
bootable/recovery/dosfstools/src/check.c:591:4: error: format specifies type 'unsigned long' but the argument has type 'unsigned long long'
[-Werror,-Wformat]
                 (uint64_t)clusters * fs->cluster_size,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This was fixed upstream in
"Fix format string in check_file() (%lu -> %llu)" (dosfstools/dosfstools@d7665f2)
This commit applies the change on top of TWRP's dosfstools copy.

Change-Id: I23374594662fd95e795f793112e78c54d8d50b30
  • Loading branch information
stephan-gh authored and Dees-Troy committed Mar 22, 2019
1 parent 7e94158 commit a0a1635
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dosfstools/src/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,10 +585,10 @@ static int check_file(DOS_FS * fs, DOS_FILE * file)
if (!(file->dir_ent.attr & ATTR_DIR) && le32toh(file->dir_ent.size) <=
(uint64_t)clusters * fs->cluster_size) {
printf
("%s\n File size is %u bytes, cluster chain length is > %lu "
("%s\n File size is %u bytes, cluster chain length is > %llu "
"bytes.\n Truncating file to %u bytes.\n", path_name(file),
le32toh(file->dir_ent.size),
(uint64_t)clusters * fs->cluster_size,
(unsigned long long)clusters * fs->cluster_size,
le32toh(file->dir_ent.size));
truncate_file(fs, file, clusters);
break;
Expand Down

0 comments on commit a0a1635

Please sign in to comment.