Unify the void cast usage

1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro

Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-01-02 20:09:50 +08:00
parent 73e1696e8b
commit 857158451b
263 changed files with 1038 additions and 1047 deletions

View File

@@ -175,7 +175,7 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
* SIGINT.
*/
(void)ioctl(stdout->fs_fd, TIOCSCTTY, pid);
ioctl(stdout->fs_fd, TIOCSCTTY, pid);
/* Wait for the application to exit. We did lock the scheduler
* above, but that does not guarantee that the application did not
@@ -228,7 +228,7 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
*/
}
(void)ioctl(stdout->fs_fd, TIOCSCTTY, -1);
ioctl(stdout->fs_fd, TIOCSCTTY, -1);
}
# ifndef CONFIG_NSH_DISABLEBG
else
@@ -270,10 +270,10 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
*/
errout_with_actions:
(void)posix_spawn_file_actions_destroy(&file_actions);
posix_spawn_file_actions_destroy(&file_actions);
errout_with_attrs:
(void)posix_spawnattr_destroy(&attr);
posix_spawnattr_destroy(&attr);
errout:
/* Most posix_spawn interfaces return a positive errno value on failure