You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2020/07/30 06:59:59 UTC
[incubator-nuttx] branch master updated (e79298b -> 1078210)
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from e79298b tools/Config.mk: Unquote the custom board path before using it in Makefile functions.
new ba4a710 fs/hostfs/hostfs.c: Remove a redundant assignment
new dc6b61c fs/romfs/fs_romfs.c: Remove redundant assignments
new 1078210 fs/mount/fs_mount.c: Remove a redandunt assignment
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
fs/hostfs/hostfs.c | 2 --
fs/mount/fs_mount.c | 2 +-
fs/romfs/fs_romfs.c | 8 --------
3 files changed, 1 insertion(+), 11 deletions(-)
[incubator-nuttx] 02/03: fs/romfs/fs_romfs.c: Remove redundant
assignments
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit dc6b61caf922efd94382cd0ac2a1b2e18363e45e
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Jul 30 13:25:21 2020 +0900
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.
---
fs/romfs/fs_romfs.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/fs/romfs/fs_romfs.c b/fs/romfs/fs_romfs.c
index a2c49a5..1676aa3 100644
--- a/fs/romfs/fs_romfs.c
+++ b/fs/romfs/fs_romfs.c
@@ -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);
[incubator-nuttx] 01/03: fs/hostfs/hostfs.c: Remove a redundant
assignment
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit ba4a7107dfcb13ffc5c8c858291a78ccde9942d5
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Jul 30 13:18:21 2020 +0900
fs/hostfs/hostfs.c: Remove a redundant assignment
Found by clang-check:
hostfs/hostfs.c:1081:3: warning: Value stored to 'ret' is never read
ret = OK; /* Assume success */
^ ~~
1 warning generated.
---
fs/hostfs/hostfs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/hostfs/hostfs.c b/fs/hostfs/hostfs.c
index 8a22c11..7b6f259 100644
--- a/fs/hostfs/hostfs.c
+++ b/fs/hostfs/hostfs.c
@@ -1078,8 +1078,6 @@ static int hostfs_unbind(FAR void *handle, FAR struct inode **blkdriver,
/* Check if there are sill any files opened on the filesystem. */
- ret = OK; /* Assume success */
-
ret = hostfs_semtake(fs);
if (ret < 0)
{
[incubator-nuttx] 03/03: fs/mount/fs_mount.c: Remove a redandunt
assignment
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 1078210f7f886ee88847f6add39c8819d258a6a6
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Jul 30 13:27:35 2020 +0900
fs/mount/fs_mount.c: Remove a redandunt assignment
Found by clang-check:
mount/fs_mount.c:287:8: warning: Although the value stored to 'ret' is used in
the enclosing expression, the value is never actually read from 'ret'
(ret = find_blockdriver(source, mountflags, &drvr_inode)) >= 0)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
---
fs/mount/fs_mount.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/mount/fs_mount.c b/fs/mount/fs_mount.c
index 3e33c75..921decd 100644
--- a/fs/mount/fs_mount.c
+++ b/fs/mount/fs_mount.c
@@ -284,7 +284,7 @@ int nx_mount(FAR const char *source, FAR const char *target,
#ifdef BDFS_SUPPORT
if (source != NULL &&
- (ret = find_blockdriver(source, mountflags, &drvr_inode)) >= 0)
+ find_blockdriver(source, mountflags, &drvr_inode) >= 0)
{
/* Find the block based file system */