[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] unused variable warning
From: |
Jordi Gutierrez Hermoso |
Subject: |
Re: [Help-gsl] unused variable warning |
Date: |
Wed, 28 Mar 2007 22:09:10 -0600 |
On 28 Mar 2007 21:18:54 -0000, Awhan Patnaik
<address@hidden> wrote:
I am using g++ compiler to integrate a system of ordinary differential
equations. I have turned on the warning flags
-W and -Wall -Werror
How can I get rid of the warning?
Is there some elegant way apart from a dirty hack of using ``t\" is some
operation which has no real meaning and > exists only to get rid of the warning
?
That's what I normally do. Just put
t;
somewhere in your code. It will get rid of the warning and generates
no object code as far as I can tell if you're using -O3 optimisation
flag, which you should be using for numerical coding anyways.
Alternatively, instead of using -Wall, you can use
-W$(each-individual-warning) as a parameter to g++. (man gcc to see
what warnings -Wall turns on, and just mention each warning
individually instead of all at once; put them in your Makefile).
By the way, are you actually coding in C++? If so, this is
interesting, because it pleases me a lot to see that there is real
demand for a C++ version of the GSL. I put an application for doing
this for Google Summer of Code. I should know by April 11 if GNU and
Google think that this is a good project. A C++ class instead of rigid
function signatures with void* should be better equipped handle better
unused arguments. :-)
- Jordi G. H.