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

In C code, allow variables to be declared other than at the start of a function

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT12.0.0, 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: Not Applicable
    • None
    • Storage Engines
    • 2
    • StorEng - 2024-11-26

      This ticket will update the WiredTiger C coding standard to allow variables to be declared other than at the start of a function.

      The work includes:

      • updating the C coding standard wording
      • updating compiler flags to
        • allow allow variables to be declared other than at the start of a function
        • ensure that any attempt to use a goto to jump over variable initialisation generates an error
      • update code checkers (eg s_all) to support this change
      • make a small number of example changes to the WiredTiger source code to demonstrate (and test) the coding standard change.

            Assignee:
            jeremy.thorp@mongodb.com Jeremy Thorp
            Reporter:
            jeremy.thorp@mongodb.com Jeremy Thorp
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: