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

Coverity false positive on fopen call

    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

      test/utility/misc.c: testutil_progress()

      168        if (opts->progress_fp == NULL)
         	
      CID 1399760 (#1 of 1): Side effect in assertion (ASSERT_SIDE_EFFECT)
      assignment_where_comparison_intended: Assignment opts->progress_fp = fopen(opts->progress_file_name, "w") has a side effect. This code will work differently in a non-debug build.
         	Did you intend to use a comparison ("==") instead?
      169                testutil_assert((opts->progress_fp =
      170                    fopen(opts->progress_file_name, "w")) != NULL);
      

      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: