Menu

#91 Please apply patches to remove warning messages

closed
None
5
2012-10-31
2011-01-18
No

Hi,
There are few lines in the code that generate a lot of warnings when compiling.
The attached patches fix these issues.

Cheers,

Discussion

  • R Bernard Davison

     
  • Jon S. Berndt

    Jon S. Berndt - 2011-01-19

    Which compiler are you using?

     
  • Bertrand Coconnier

    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

    Jon S. Berndt - 2011-01-23

    Compiler specific tags are bad news and won't be added. Better to go after the cause rather than the symptom.

     
  • Dennis Linse

    Dennis Linse - 2011-01-23

    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.

     
  • Bertrand Coconnier

    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.

     

Log in to post a comment.