cast to resolve signed/unsigned comparison compiler warning in FATFileSystem::dir_seek()

pull/6018/head
Brendan McDonnell 2018-02-05 15:01:46 -05:00
parent 964e6e74fb
commit 88cd13b115
1 changed files with 3 additions and 2 deletions

View File

@ -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<FATFS_DIR*>(dir);
off_t dptr = static_cast<off_t>(dh->dptr);
lock();
if (offset < dh->dptr) {
if (offset < dptr) {
f_rewinddir(dh);
}
while (dh->dptr < offset) {
while (dptr < offset) {
FILINFO finfo;
FRESULT res;