Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-912

Coverity analysis defect 76552: Unused value

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.0-beta0
    • Affects Version/s: None
    • Component/s: None
    • None

      A value assigned to a variable is never used.

      Defect 76552 (STATIC_C)
      Checker UNUSED_VALUE (subcategory none)
      File: /src/mongoc/mongoc-socket.c
      Function _mongoc_socket_try_sendv
      /src/mongoc/mongoc-socket.c, line: 1014
      Overwriting previous write to "ret" with value from "sendmsg(sock->sd, &msg, MSG_NOSIGNAL)".

             ret = sendmsg (sock->sd, &msg,
      

      /src/mongoc/mongoc-socket.c, line: 995
      Assigning value "-1L" to "ret" here, but that stored value is overwritten before it can be used.

             ssize_t ret = -1;
      

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: