From 50f3806f15fd29f1806bcdcffcf364d15490ea69 Mon Sep 17 00:00:00 2001 From: snow flurry Date: Mon, 16 Nov 2020 20:30:41 -0800 Subject: [PATCH] dosfs: get_byte_offset requires an unsigned offset No reason for it to be negative, and gcc -Wextra complains when it's signed. --- src/dosfs.c | 2 +- src/dosfs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dosfs.c b/src/dosfs.c index cebdd0d..e295be4 100644 --- a/src/dosfs.c +++ b/src/dosfs.c @@ -243,7 +243,7 @@ read_fat_chain(dosfs_t *fsd, unsigned int first, int *length) * offset, i.e. one that can be used with lseek()/pread(). */ int -get_byte_offset(dosfs_t *fsd, dosfile_t *file, int f_offset) +get_byte_offset(dosfs_t *fsd, dosfile_t *file, unsigned int f_offset) { int coff, csz; diff --git a/src/dosfs.h b/src/dosfs.h index d422818..500d9df 100644 --- a/src/dosfs.h +++ b/src/dosfs.h @@ -80,6 +80,6 @@ void close_image(dosfs_t *); dosfile_t *dos_listdir(dosfs_t *, unsigned int); void dos_freedir(dosfile_t *); -int get_byte_offset(dosfs_t *, dosfile_t *, int); +int get_byte_offset(dosfs_t *, dosfile_t *, unsigned int); #endif /* !_FAT12_H */