From 88cd13b11532af393e48fdc0393acb5a268f6179 Mon Sep 17 00:00:00 2001 From: Brendan McDonnell Date: Mon, 5 Feb 2018 15:01:46 -0500 Subject: [PATCH] cast to resolve signed/unsigned comparison compiler warning in FATFileSystem::dir_seek() --- features/filesystem/fat/FATFileSystem.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/features/filesystem/fat/FATFileSystem.cpp b/features/filesystem/fat/FATFileSystem.cpp index 69fbc29c7d..ece5be1432 100644 --- a/features/filesystem/fat/FATFileSystem.cpp +++ b/features/filesystem/fat/FATFileSystem.cpp @@ -712,13 +712,14 @@ ssize_t FATFileSystem::dir_read(fs_dir_t dir, struct dirent *ent) void FATFileSystem::dir_seek(fs_dir_t dir, off_t offset) { FATFS_DIR *dh = static_cast(dir); + off_t dptr = static_cast(dh->dptr); lock(); - if (offset < dh->dptr) { + if (offset < dptr) { f_rewinddir(dh); } - while (dh->dptr < offset) { + while (dptr < offset) { FILINFO finfo; FRESULT res;