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

Reduce/eliminate warnings from the clang static analyser

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • StorEng - Refinement Pipeline

      WT-12144 updated the Clang static analyser task (thanks @Etienne for doing that!), which is great as clang-tidy and scan-build can carry out lots of useful checks on our code. For example the checks helped find these bugs: WT-12164 / WT-12169

      However, I’ve tripped over some issues after I merged develop into a couple of branches I have open (thereby applying WT-12144 to them). Specifically the clang analyser task failed because I’d some changed code in a way that changed the warnings that the analyser was generating. 

      The s_clang_scan script diffs the results of the analysis of your code with the ‘known’ warnings in s_clang_scan.diff, and generates an error on any difference. That difference could be because you’ve triggered another warning, or because (as in one of my branches) you’ve actually removed a warning.

      This ticket will investigate the wider use of code refactoring and suppression techniques on specific lines of code to suppress warnings from those lines (and thereby reducing the size of the .diff file - hopefully to zero).

       

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            jeremy.thorp@mongodb.com Jeremy Thorp
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: