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.