Uploaded image for project: 'Lucy'
  1. Lucy
  2. LUCY-144 Refactor away C89 idioms
  3. LUCY-145

Refactor away C89 excess braces

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      Because C89 does not allow mixed declarations and code, we have occasionally
      used bare braces to create new scopes solely for the purpose of declaring a
      variable or two. In some cases, this was appropriate to limit the scope of a
      short lived variable in the midst of a long function, but there were other
      cases when we were just declaring a return value or such towards the end and
      C89 forced the issue.

      To find candidates for review, use the following command:

          grep -r "^ \+{ *$" lucy/ | grep -v -e "svn\|charmonizer\|modules\|\.pm"
      

      Attachments

        1. lucy_patch-145.diff
          80 kB
          tripwired

        Activity

          People

            marvin Marvin Humphrey
            marvin Marvin Humphrey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: