There are few lines in the code that generate a lot of warnings when compiling.
The attached patches fix these issues.
R Bernard Davison
Jon S. Berndt
Which compiler are you using?
My recollection is that the attribute ((unused)) syntax is gcc's. The point of this is to warn the compiler that, yes we know, this variable is not used and that it should not report it.
However, I am not sure that it is a good idea to include compiler specific constructions in JSBSim. And we won't use lots of #ifdef to handle different compilers syntax, will we ?
Jon S. Berndt
Compiler specific tags are bad news and won't be added. Better to go after the cause rather than the symptom.
I agree with Jon on the compiler-specific tags. Go after the cause not the symptom. That said, there appear to be about three of the changes in the provided patches that are addressing causes, not just putting in attribute things. Someone C++ knowledgeable should check those out. They are all very short.
The fixes from patch_FGTank.cpp and patch_FGTank.h have been applied to CVS.
The fix from patch_FGForce.cpp is rejected because the constructor of FGJSBBase is doing nothing so there is not much interest in calling it.
Other patches are rejected because they are compiler specific and because the compiler with -Wall does not complain about these parameters not being used anyway.