Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-4646

Coverity doesn't like testutil_assert() on fopen calls

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT3.2.0, 4.1.10
    • Component/s: None
    • Labels:
      None
    • Story Points:
      2
    • Sprint:
      Storage Engines 2019-03-25

      Description

      Coverity suddenly complained about 4 fopen calls in test/salvage/salvage.c, complaints #1399726, 27, 28 and 29.

      162
         	
      CID 1399729 (#1 of 1): Side effect in assertion (ASSERT_SIDE_EFFECT)
      assignment_where_comparison_intended: Assignment res_fp = fopen("WT_TEST/__slvg.result", "w") has a side effect. This code will work differently in a non-debug build.
         	Did you intend to use a comparison ("==") instead?
      163        testutil_assert((res_fp = fopen(RSLT, "w")) != NULL);
      

      I don't see any real problems, but I'll submit a branch to keep Coverity quiet.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                keith.bostic Keith Bostic
                Reporter:
                keith.bostic Keith Bostic
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: