[RTEMS Project] #4280: gen_uuid.c: Unchecked return value from library errors spotted by Coverity

RTEMS trac trac at rtems.org
Tue Mar 2 14:26:44 UTC 2021


#4280: gen_uuid.c: Unchecked return value from library errors spotted by Coverity
------------------------+--------------------
  Reporter:  Ryan Long  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  normal     |  Milestone:  6.1
 Component:  lib        |    Version:  6
  Severity:  normal     |   Keywords:
Blocked By:             |   Blocking:
------------------------+--------------------
 CID 1049146: Unchecked return value from library in get_clock().
 CID 1049147: Unchecked return value from library in get_random_fd().

 CID 1049146
 {{{
 427                rewind(state_f);
 428                fl.l_type = F_UNLCK;
    CID 1049146 (#1 of 1): Unchecked return value from library
 (CHECKED_RETURN)18. check_return: Calling fcntl(state_fd, 8, &fl) without
 checking return value. This library function may fail and return an error
 code. [Note: The source code implementation of the function has been
 overridden by a builtin model.]
 429                fcntl(state_fd, F_SETLK, &fl);
 430        }
 431
 432        *clock_high = clock_reg >> 32;
 }}}

 CID 1049147
 {{{
 167                        if (i >= 0)
    CID 1049147 (#1 of 1): Unchecked return value from library
 (CHECKED_RETURN)5. check_return: Calling fcntl(fd, 2, i | 1) without
 checking return value. This library function may fail and return an error
 code. [Note: The source code implementation of the function has been
 overridden by a builtin model.]
 168                                fcntl(fd, F_SETFD, i | FD_CLOEXEC);
 169                }
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/4280>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list