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

Coverity doesn't like testutil_assert() on fopen calls

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • WT3.2.0, 4.1.10
    • Affects Version/s: None
    • Component/s: None
    • None
    • 2
    • Storage Engines 2019-03-25

      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.

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: