[PD-dev] unused variables
Mathieu Bouchard
matju at artengine.ca
Thu Apr 6 16:02:43 CEST 2006
Johannes Zmölnig wrote:
> static void help_time(t_time *x)
> {
> + ZEXY_USEVAR(x);
> post("\n%c time\t\t:: get the current system time", HEARTSYMBOL);
> post("\noutputs are\t: hour / minute / sec / msec");
>
You don't need to do things like that. Almost all of the time, parameters
that are not in use, have a reason for not being in use, and it's the
other local variables that proliferate as the code evolves and we forget
to delete those variables because they are not seen outside of the
function that they are defined in.
With GCC 3, you can do:
-Wall -Wno-unused -Wunused-variable
which only checks for local variables, and disables checks on unused
parameters, unused functions, etc.; it's also possible to reenable check
for unused functions if it is helpful to you.
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada
More information about the Pd-dev
mailing list