[ 
https://issues.apache.org/jira/browse/LUCY-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Logan Bell updated LUCY-148:
----------------------------

    Attachment: c99_patch05.patch

#       modified:   core/Lucy/Index/IndexManager.c
#       modified:   core/Lucy/Index/Inverter.c
#       modified:   core/Lucy/Index/PolyLexicon.c
#       modified:   core/Lucy/Index/Posting/ScorePosting.c
#       modified:   core/Lucy/Index/PostingPool.c
#       modified:   core/Lucy/Index/SegWriter.c
#       modified:   core/Lucy/Plan/Schema.c
#       modified:   core/Lucy/Search/Collector/SortCollector.c
#       modified:   core/Lucy/Search/IndexSearcher.c
#       modified:   core/Lucy/Search/ORMatcher.c
#       modified:   core/Lucy/Search/ORQuery.c
#       modified:   core/Lucy/Search/PhraseQuery.c
#       modified:   core/Lucy/Search/PolyQuery.c
#       modified:   core/Lucy/Search/PolySearcher.c
#       modified:   core/Lucy/Search/QueryParser.c
#       modified:   core/Lucy/Search/SortSpec.c
                
> Mix declarations and code
> -------------------------
>
>                 Key: LUCY-148
>                 URL: https://issues.apache.org/jira/browse/LUCY-148
>             Project: Lucy
>          Issue Type: Sub-task
>            Reporter: Marvin Humphrey
>            Priority: Minor
>         Attachments: c99_patch01.patch, c99_patch02.patch, c99_patch03.patch, 
> c99_patch04.patch, c99_patch05.patch
>
>
> 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.
> {noformat}
> $ grep -r "^ \+[A-Za-z_0-9]\+[ *]\+[a-z0-9_]\+[;,]" lucy \
> > | grep -v "\<return\>" \
> > | grep -v -e "svn\|charmonizer\|modules\|\.pm"
> {noformat}
> LUCY-146 can be considered a specific case of this issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to