fs/romfs/fs_romfs.c: Remove redundant assignments
Found by clang-check: romfs/fs_romfs.c:431:7: warning: Value stored to 'bytesread' is never read bytesread = 0; ^ ~ romfs/fs_romfs.c:455:11: warning: Value stored to 'sector' is never read sector += nsectors; ^ ~~~~~~~~ 2 warnings generated.
This commit is contained in:
parent
ba4a7107df
commit
dc6b61caf9
@ -428,7 +428,6 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer,
|
||||
offset = rf->rf_startoffset + filep->f_pos;
|
||||
sector = SEC_NSECTORS(rm, offset);
|
||||
sectorndx = offset & SEC_NDXMASK(rm);
|
||||
bytesread = 0;
|
||||
|
||||
/* Check if the user has provided a buffer large enough to
|
||||
* hold one or more complete sectors -AND- the read is
|
||||
@ -452,7 +451,6 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer,
|
||||
goto errout_with_semaphore;
|
||||
}
|
||||
|
||||
sector += nsectors;
|
||||
bytesread = nsectors * rm->rm_hwsectorsize;
|
||||
}
|
||||
else
|
||||
@ -479,12 +477,6 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer,
|
||||
|
||||
bytesread = buflen;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We will read to the end of the buffer (or beyond) */
|
||||
|
||||
sector++;
|
||||
}
|
||||
|
||||
finfo("Return %d bytes from sector offset %d\n",
|
||||
bytesread, sectorndx);
|
||||
|
Loading…
Reference in New Issue
Block a user