pele-python / mcpele

Monte Carlo and parallel tempering routines built on the pele foundation
Other
20 stars 5 forks source link

Unused parameter warnings #46

Closed kjs73 closed 10 years ago

kjs73 commented 10 years ago

This silences some compiler warnings about unused parameters. There is some discussion on the issue here: http://stackoverflow.com/questions/3599160/unused-parameter-warnings-in-c-code It seemed fine to me to take the version that is safest but probably only works in gcc, because we are using other gcc specific features as well. Otherwise the most general thing is apparently the macro solution.

js850 commented 10 years ago

will other compilers give an error?

js850 commented 10 years ago

another option is to leave the parameter unnamed in the function declaration

def func(double x, double){
    return x
}
kjs73 commented 10 years ago

Ah, that sounds like a much better option!

kjs73 commented 10 years ago

Should we merge this before it causes conflicts later?

js850 commented 10 years ago

looks good