template borrowernumber and cookie are declared before use then declared again on first usage creating 3 unused variables that are almost immediately hidden
Created attachment 45016 [details] [review] Proposed Patch Simple test: applying the patch removes the compile-time warnings displayed on perl -wc catalogue/search.pl
Created attachment 45017 [details] [review] Amended patch Added removal of declarations of two unused variables to patch to aid in decluttering the source
Created attachment 45156 [details] [review] Bug 15217 Remove redundant duplicate var declaration remove superfluous second declaration of template, borrowernumber and cookie which are never used Also removed the variables @results and @results_array which are declared but not used Signed-off-by: Frédéric Demians <f.demians@tamil.fr> As suggested by Colin, perl -wc catalogue/search.pl doesn't complain anymore after applying the patch. perlcritic confirms the 2 variables were unused.
Created attachment 45208 [details] [review] [PASSED QA] Bug 15217 Remove redundant duplicate var declaration remove superfluous second declaration of template, borrowernumber and cookie which are never used Also removed the variables @results and @results_array which are declared but not used Signed-off-by: Frédéric Demians <f.demians@tamil.fr> As suggested by Colin, perl -wc catalogue/search.pl doesn't complain anymore after applying the patch. perlcritic confirms the 2 variables were unused. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 46056 [details] [review] Bug 15217 Remove redundant duplicate var declaration remove superfluous second declaration of template, borrowernumber and cookie which are never used Also removed the variables @results and @results_array which are declared but not used Signed-off-by: Frédéric Demians <f.demians@tamil.fr> As suggested by Colin, perl -wc catalogue/search.pl doesn't complain anymore after applying the patch. perlcritic confirms the 2 variables were unused. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
pushed to master - thanks
Patch pushed to 3.22.x, will be in 3.22.2
This patch has been pushed to 3.20.x, will be in 3.20.8.