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

Fix Coverity swapped arguments defect

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.1, 5.2.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 2
    • Storage - Ra 2021-11-29

      Two Coverity errors for the same error.  First: https://coverity.corp.mongodb.com/reports.htm#v17018/p10049/fileInstanceId=38658268&defectInstanceId=20178715&mergedDefectId=121031&eventId=20178715-0
      In file: test/csuite/wt8057_compact_stress/main.c:

      265        /* If we made progress with compact, verify that compact stats support that. */
      
         CID 121031 (#1 of 1): Arguments in wrong order (SWAPPED_ARGUMENTS)swapped_arguments: The positions of arguments in the call to get_compact_progress do not match the ordering of the parameters:&pages_rewritten is passed to pages_selected.&pages_selected is passed to pages_rewritten. [show details]
      
      266        get_compact_progress(session, uri1, &pages_reviewed, &pages_rewritten, &pages_selected); 

      Second:
      https://coverity.corp.mongodb.com/reports.htm#v17018/p10049/fileInstanceId=38897021&defectInstanceId=20188917&mergedDefectId=121114
      In file: test/csuite/wt7989_compact_checkpoint/main.c:

      186    /* Collect compact progress stats. */
         	
        CID 121114 (#1 of 1): Arguments in wrong order (SWAPPED_ARGUMENTS)
      swapped_arguments: The positions of arguments in the call to get_compact_progress do not match the ordering of the parameters:&pages_rewritten is passed to pages_skipped.&pages_skipped is passed to pages_rewritten. [show details]
      
      187    get_compact_progress(session, uri, &pages_reviewed, &pages_rewritten, &pages_skipped); 

            Assignee:
            andrew.morton@mongodb.com Andrew Morton
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: