mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 12:55:43 +08:00
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:
@@ -357,7 +357,7 @@ static void nsh_releaseargs(struct cmdarg_s *arg)
|
||||
|
||||
if (vtbl->np.np_redirect)
|
||||
{
|
||||
(void)close(arg->fd);
|
||||
close(arg->fd);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -639,7 +639,7 @@ static int nsh_execute(FAR struct nsh_vtbl_s *vtbl,
|
||||
|
||||
if (vtbl->np.np_redirect)
|
||||
{
|
||||
(void)nsh_redirect(bkgvtbl, fd, NULL);
|
||||
nsh_redirect(bkgvtbl, fd, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -681,9 +681,9 @@ static int nsh_execute(FAR struct nsh_vtbl_s *vtbl,
|
||||
|
||||
/* Set up the thread attributes */
|
||||
|
||||
(void)pthread_attr_init(&attr);
|
||||
(void)pthread_attr_setschedpolicy(&attr, SCHED_NSH);
|
||||
(void)pthread_attr_setschedparam(&attr, ¶m);
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setschedpolicy(&attr, SCHED_NSH);
|
||||
pthread_attr_setschedparam(&attr, ¶m);
|
||||
|
||||
/* Execute the command as a separate thread at the appropriate priority */
|
||||
|
||||
@@ -700,7 +700,7 @@ static int nsh_execute(FAR struct nsh_vtbl_s *vtbl,
|
||||
* Otherwise, we would have a memory leak.
|
||||
*/
|
||||
|
||||
(void)pthread_detach(thread);
|
||||
pthread_detach(thread);
|
||||
|
||||
nsh_output(vtbl, "%s [%d:%d]\n", argv[0], thread, param.sched_priority);
|
||||
}
|
||||
|
Reference in New Issue
Block a user