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

Coverity analysis defect 67272: Redundant test

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • None
    • 1.3.0-beta0
    • None
    • None

    Description

      Test always evaluates the same

      Defect 67272 (STATIC_C)
      Checker DEADCODE (subcategory redundant_test)
      File: /src/mongoc/mongoc-async-cmd.c
      Function _mongoc_async_cmd_phase_send
      /src/mongoc/mongoc-async-cmd.c, line: 280
      Condition "bytes", taking false branch. Now the value of "bytes" is equal to 0.

             while (bytes) {

      /src/mongoc/mongoc-async-cmd.c, line: 273
      Condition "bytes < 0L", taking false branch. Now the value of "bytes" is at least 0.

             if (bytes < 0) {

      /src/mongoc/mongoc-async-cmd.c, line: 292
      At condition "bytes", the value of "bytes" must be equal to 0.

             if (!bytes) {

      /src/mongoc/mongoc-async-cmd.c, line: 288
      Assigning: "bytes" = "0L".

                   bytes = 0;

      /src/mongoc/mongoc-async-cmd.c, line: 292
      The condition "!bytes" must be true.

             if (!bytes) {

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: