lilgp1.1 -Wall patches ========================================================================== -------------------------------------------------------------------------- Legalese: WARNING: Use these at your own risk. No warrantee is expressed or implied. -------------------------------------------------------------------------- ========================================================================== Overview: -------- When compiling lilgp1.1 with gcc's -Wall option we get a number of warnings (see below). They are annoying. So I have eliminated them. Installation: ------------ PLEASE READ ALL OF THE INDIVIDUAL PATCH NOTES BELOW BEFORE APPLYING PATCHES!!! Step 1: Extract the patches in to your lilgp kernel directory. For example: mv lilgp1.1.Wall.patches.tar.bz2 lilgp1.1/1.1/kernel cd lilgp1.1/1.1/kernel bunzip2 -c lilgp1.1.Wall.patches.tar.bz2 | tar -xvf - Step 2: Apply the patches. For example: for i in *patch; do patch < $i; done That's all. You're done! ========================================================================== Individual patch notes: Innocuous patches: ----------------- Unused variables have been removed from the following files: kernel/main.c kernel/gp.c kernel/ckpoint.c kernel/params.c Questionable patches: -------------------- In "kernel/eval.c" the evaluate_tree_recurse() returns nothing, when it should return a DATATYPE. This seems to be a corner-case bug, which should "never happen". My solution is to make the program terminate in this corner case. This is probably not the perfect solution, but I don't have the time to dig deeper. In "kernel/ckpoint.c" there is a bug in the fprintf format string. Taking out the inapplicable "l" directive has simply silenced the warning. The bug may still exist. ========================================================================== gcc -Wall warnings suppressed by this patch: ../../kernel/main.c: In function `main': ../../kernel/main.c:58: warning: unused variable `param' ../../kernel/gp.c: In function `read_saved_individuals': ../../kernel/gp.c:892: warning: unused variable `k' ../../kernel/gp.c:892: warning: unused variable `j' ../../kernel/eval.c: In function `evaluate_tree_recurse': ../../kernel/eval.c:199: warning: control reaches end of non-void function ../../kernel/ephem.c: In function `enlarge_ephem_space': ../../kernel/ephem.c:118: warning: unused variable `p' ../../kernel/ckpoint.c: In function `read_checkpoint': ../../kernel/ckpoint.c:46: warning: unused variable `j' ../../kernel/ckpoint.c: In function `write_checkpoint': ../../kernel/ckpoint.c:193: warning: unused variable `j' ../../kernel/ckpoint.c: In function `read_population': ../../kernel/ckpoint.c:327: warning: unused variable `l' ../../kernel/ckpoint.c: In function `write_population': ../../kernel/ckpoint.c:560: warning: unused variable `j' ../../kernel/ckpoint.c: In function `write_individual': ../../kernel/ckpoint.c:592: warning: use of `l' length character with `f' type character ../../kernel/ckpoint.c:592: warning: use of `l' length character with `f' type character ../../kernel/ckpoint.c:592: warning: use of `l' length character with `f' type character ../../kernel/event.c: In function `event_string': ../../kernel/event.c:46: warning: implicit declaration of function `sprintf' ../../kernel/event.c:46: warning: int format, clock_t arg (arg 3) ../../kernel/params.c: In function `read_parameter_database': ../../kernel/params.c:267: warning: unused variable `value' ../../kernel/params.c:267: warning: unused variable `name'