firmware: fat: fix sector_t passed to 64-bit format strings

sector_t is still 32-bit on most targets, resulting in compile
warnings on debug builds when used with an %llu/%llx format.
Fix by always casting the sector to uint64_t.

Change-Id: I5afc4a0ae170981c304274806e00ac07be232cd8
This commit is contained in:
Aidan MacDonald 2025-12-23 22:51:51 +00:00 committed by Solomon Peachy
parent d21d8f49fc
commit 28fa9ca760

View file

@ -2465,7 +2465,7 @@ static long transfer(struct bpb *fat_bpb, sector_t start, long count,
long rc = 0;
DEBUGF("%s(s=%llx, c=%lx, wr=%u)\n", __func__,
start + fat_bpb->startsector, count, write ? 1 : 0);
(uint64_t)(start + fat_bpb->startsector), count, write ? 1 : 0);
if (write)
{
@ -2557,7 +2557,7 @@ long fat_readwrite(struct fat_filestr *filestr, unsigned long sectorcount,
file->firstcluster, sectorcount, (long)buf,
write ? "write":"read");
DEBUGF("%s: sec:%llx numsec:%ld eof:%d\n", __func__,
sector, (long)sectornum, eof ? 1 : 0);
(uint64_t)sector, (long)sectornum, eof ? 1 : 0);
eof = false;