mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 11:23:07 +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:
@@ -91,7 +91,7 @@ int nsh_catfile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
|
||||
buffer = (FAR char *)malloc(IOBUFFERSIZE);
|
||||
if(buffer == NULL)
|
||||
{
|
||||
(void)close(fd);
|
||||
close(fd);
|
||||
nsh_error(vtbl, g_fmtcmdfailed, cmd, "malloc", NSH_ERRNO);
|
||||
return ERROR;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ int nsh_catfile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
|
||||
|
||||
/* Close the input file and return the result */
|
||||
|
||||
(void)close(fd);
|
||||
close(fd);
|
||||
free(buffer);
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user