stack-of-tasks / sot-core

Hierarchical task solver plug-in for dynamic-graph
BSD 2-Clause "Simplified" License
19 stars 32 forks source link

Warning fixes #4

Closed gergondet closed 14 years ago

gergondet commented 14 years ago

As of https://github.com/jrl-umi3218/sot-core/commit/6547447f2f62cb87b150e8102ef02cdbdc07a2bf I don't have any more warnings with gcc-4.2 and current master of sot-core dependencies, except for:

For the first one we can't do much and don't generate much output anyway.

The ones from sot-core are much more annoying because: a\ they generate kind of huge scary warning messages for nothing as gcc reports where it happens in case of instanciation and with templates they are huge b\ we can fix them

There's (at least) two ways to fix that: 1\ Cast unused parameter to (void), this is easy and quick (with no impact ?) 2\ Use variable attributes from gcc (cf http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html#Variable-Attributes ) which basically tells to gcc that a particular may be unused in the function but it shouldn't worry about it, this seems cleaner but is most likely non compatible with other compilers so introduce a UNUSED(x) macro for example which in the end is not so clean

We could also let this warnings be :-)

fbleibel commented 14 years ago

I would personnally go for the beatles option for now and try to make it work on the robot first...

gergondet commented 14 years ago

A much simpler fix is actually to not name the parameters you don't want to use, this is simple, quick and has absolutely no impact, win :-)