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

Coverity doesn't like testutil_assert() on fopen calls

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial - P5
    • Resolution: Fixed
    • None
    • WT3.2.0, 4.1.10
    • None
    • None
    • 2
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: