- changed status to open
- removed comment
Reduce warnings during an ET build
A new user of the ET might be disconcerted to see warnings during compilation such as:
/home/ianhin/Cactus/EinsteinToolkit/arrangements/Carpet/CarpetLib/src/bboxset.hh(206):
warning #1224: #warning directive: "TODO: this is incorrect"
#warning "TODO: this is incorrect"
^
I propose that such directives are replaced with a comment and a link to a TRAC ticket concerning the problem.
Further, we should aim to eliminate as many warnings as possible from the build, similarly to avoid eroding confidence.
Warnings can also make it hard to find the real error messages, when a build fails with errors.
Other warnings I see are similar to:
In file included from /home/ianhin/Cactus/GBSC12/arrangements/CactusUtils/Formaline/src/thornlist.cc:13:
/home/ianhin/Cactus/GBSC12/configs/bbh/bindings/include/thornlist.h:61: warning: deprecated conversion from
string constant to ‘char*’
/home/ianhin/Cactus/GBSC12/arrangements/EinsteinInitialData/TwoPunctures/src/Newton.c: In function ‘TestRelax’:
/home/ianhin/Cactus/GBSC12/arrangements/EinsteinInitialData/TwoPunctures/src/Newton.c:287: warning: passing
argument 6 of ‘resid’ from incompatible pointer type
/home/ianhin/Cactus/GBSC12/arrangements/EinsteinInitialData/TwoPunctures/src/Newton.c:75: note: expected
‘const int * const restrict* const restrict’ but argument is of type ‘int **’
/home/ianhin/Cactus/GBSC12/configs/bbh/bindings/Variables/ADMBase.c: In function ‘CCTKi_BindingsFortranWrapperADMBase’:
/home/ianhin/Cactus/GBSC12/configs/bbh/bindings/Variables/ADMBase.c:34: warning: passing argument 22 of ‘function’
from incompatible pointer type
/home/ianhin/Cactus/GBSC12/configs/bbh/bindings/Variables/ADMBase.c:34: note: expected ‘const struct cGH * const*’
but argument is of type ‘struct cGH **’
This last warning appears very many times during a build (though I believe it may be triggered only by GCC and not by the Intel compiler).
/home/ianhin/Cactus/GBSC12/src/main/Parameters.c: In function ‘ParameterSetBoolean’:
/home/ianhin/Cactus/GBSC12/src/main/Parameters.c:2394: warning: passing argument 4 of ‘Util_ExpressionEvaluate’
discards qualifiers from pointer target type
/home/ianhin/Cactus/GBSC12/src/include/util_Expression.h:38: note: expected ‘void *’ but argument is of type
‘const int *’
There are probably more as well.
Keyword:
Comments (4)
-
-
- changed status to open
- removed comment
-
- changed status to resolved
- removed comment
I don't think it makes a lot of sense to keep this ticket open. Of course we should fix compiler warnings, all the time. Having a ticket about this everlasting task doesn't really help.
-
- changed status to closed
- edited description
- Log in to comment
Please go ahead and fix as many warnings as you can find.