Refactor all methods/functions which have unused param

Bug #621856 reported by Monty Taylor
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

Changed in drizzle:
milestone: none → ongoing
Changed in drizzle:
importance: Medium → Low
Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

Is there an easy way to find such functions?

Revision history for this message
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.

Revision history for this message
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)
Changed in drizzle:
assignee: nobody → Akash Sinha (sinha)
Revision history for this message
Bartosz Zawistowski (bzawistowski) wrote :

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  
Everyone can see this information.

Other bug subscribers