[rtems commit] gen_uuid.c: Ignore return values from fcntl()
Joel Sherrill
joel at rtems.org
Fri May 28 17:29:36 UTC 2021
Module: rtems
Branch: master
Commit: a187b092288efdb1c55f77c6f785486e64895084
Changeset: http://git.rtems.org/rtems/commit/?id=a187b092288efdb1c55f77c6f785486e64895084
Author: Ryan Long <ryan.long at oarcorp.com>
Date: Thu Mar 25 09:59:26 2021 -0400
gen_uuid.c: Ignore return values from fcntl()
CID 1049146: Unchecked return value from library in get_clock().
CID 1049147: Unchecked return value from library in get_random_fd().
Closes #4280
---
cpukit/libmisc/uuid/gen_uuid.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/cpukit/libmisc/uuid/gen_uuid.c b/cpukit/libmisc/uuid/gen_uuid.c
index 3ca75a0..71b8a56 100644
--- a/cpukit/libmisc/uuid/gen_uuid.c
+++ b/cpukit/libmisc/uuid/gen_uuid.c
@@ -165,6 +165,9 @@ static int get_random_fd(void)
if (fd >= 0) {
i = fcntl(fd, F_GETFD);
if (i >= 0)
+ #ifdef __rtems__
+ (void)
+ #endif
fcntl(fd, F_SETFD, i | FD_CLOEXEC);
}
#endif
@@ -426,6 +429,9 @@ try_again:
}
rewind(state_f);
fl.l_type = F_UNLCK;
+ #ifdef __rtems__
+ (void)
+ #endif
fcntl(state_fd, F_SETLK, &fl);
}
More information about the vc
mailing list