Refactor all methods/functions which have unused param

Bug #621856 reported by Monty Taylor on 2010-08-21
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Akash Sinha

Bug Description

There are many places in the code where we have removed the parameter name from the method definition because it is unused. While this removes the warning, it's probably also a sign that the code needs to be refactored - either to remove the param altogether or to add a method signature that things can use when they don't want to pass in that param.

Related branches

Lee Bieber (kalebral) on 2010-11-01
Changed in drizzle:
milestone: none → ongoing
Lee Bieber (kalebral) on 2011-01-25
Changed in drizzle:
importance: Medium → Low
Olaf van der Spek (olafvdspek) wrote :

Is there an easy way to find such functions?

Akash Sinha (sinha) wrote :

Creating a regex in any scripting language and scanning a file is kinda working..i am currently going through drizzled directory..found a bunch of such functions.

Akash Sinha (sinha) wrote :

I found a function " join_no_more_records()" in drizzled/ file as well its function definition is in drizzled/sql_select.h. So i want to know should i remove those params from function of .h file also..Or how could i check that .h file is not included in any other .cc file .

I want to ensure that removing those params from drizzled/sql_select.h file would not raise any conflict if that function is being called from somewhere else.

Akash Sinha (sinha) on 2011-03-12
Changed in drizzle:
assignee: nobody → Akash Sinha (sinha)

I think that quite easy way to find such function is to use -Wall and -Werror options. Then, doing find . -exec grep -H -n 'func_name' {} \; on every error got during compilation will show all occurrences of function being called. Commenting the argument name or changing proto + def of function may be the longest task in this case.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers