XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Much of Lucy was originally written for C89, and uses the C89 idiom of
      declaring all variables at the top of a scope and then assigning to them
      later. Often, this is not ideal code layout, and it would be clearer to
      declare the variable at the same time as it is initialized to a value.

      The following command will reveal many candidates for review.

      $ grep -r "^ \+[A-Za-z_0-9]\+[ *]\+[a-z0-9_]\+[;,]" lucy \
      > | grep -v "\<return\>" \
      > | grep -v -e "svn\|charmonizer\|modules\|\.pm"
      

      LUCY-146 can be considered a specific case of this issue.

      Attachments

        1. c99_patch01.patch
          1 kB
          Logan J. Bell
        2. c99_patch02.patch
          9 kB
          Logan J. Bell
        3. c99_patch03.patch
          34 kB
          Logan J. Bell
        4. c99_patch04.patch
          9 kB
          Logan J. Bell
        5. c99_patch05.patch
          39 kB
          Logan J. Bell

        Activity

          People

            logie Logan J. Bell
            marvin Marvin Humphrey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: