mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-17 07:12:06 +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:
@@ -125,7 +125,7 @@ int main(int argc, FAR char *argv[])
|
||||
{
|
||||
int errcode = errno;
|
||||
fprintf(stderr, "ERROR: Read from /dev/random failed: %d\n", errcode);
|
||||
(void)close(fd);
|
||||
close(fd);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -133,14 +133,14 @@ int main(int argc, FAR char *argv[])
|
||||
{
|
||||
fprintf(stderr, "ERROR: Read from /dev/random only produced %d bytes\n",
|
||||
(int)nread);
|
||||
(void)close(fd);
|
||||
close(fd);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Dump the sample buffer */
|
||||
|
||||
lib_dumpbuffer("Random values", (FAR const uint8_t*)buffer, nread);
|
||||
(void)close(fd);
|
||||
close(fd);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user