Skip to content

Commit

Permalink
Warnings removeds
Browse files Browse the repository at this point in the history
  • Loading branch information
trumae committed Aug 18, 2010
1 parent 6e5bc7b commit bdeaa09
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/fitexternal.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ static double getFitExternal(Individuo *ind, int verbose){
int i, pid;
char buffer[1024];
double result;
int ret;

/* escreve dados para programa externo */
if ((f = fopen("gen.ind", "wt")) == NULL){
Expand Down Expand Up @@ -56,7 +57,7 @@ static double getFitExternal(Individuo *ind, int verbose){

strcpy(buffer, "./");
strcat(buffer, programname);
system(buffer);
ret = system(buffer);

/* Le dados gerados pelo programa externo*/
if ((f = fopen("result.ind", "rt")) == NULL){
Expand Down Expand Up @@ -107,9 +108,9 @@ void fitexternal(Populacao *pop, int i1, int i2, int *champion, int *loser, int
}

//if(! (count % 1000))
if (verbose ) fprintf(stderr,"%d %.2f %.2f\n", count++, nota1, melhornota);
if (verbose ) fprintf(stderr,"%ld %.2f %.2f\n", count++, nota1, melhornota);
//if(! (count % 1000))
if (verbose) fprintf(stderr,"%d %.2f %.2f\n", count++, nota2, melhornota);
if (verbose) fprintf(stderr,"%ld %.2f %.2f\n", count++, nota2, melhornota);

if( nota1 >= nota2 ) {
*champion = i1;
Expand Down
4 changes: 2 additions & 2 deletions src/fitmult.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ void fitnessmult(Populacao *pop, int i1, int i2, int *champion, int *loser, int
}

//if(! (count % 1000))
if (verbose ) fprintf(stderr,"%d %.2f %.2f\n", count++, nota1, melhornota);
if (verbose ) fprintf(stderr,"%ld %.2f %.2f\n", count++, nota1, melhornota);
//if(! (count % 1000))
if (verbose) fprintf(stderr,"%d %.2f %.2f\n", count++, nota2, melhornota);
if (verbose) fprintf(stderr,"%ld %.2f %.2f\n", count++, nota2, melhornota);

if( nota1 >= nota2 ) {
*champion = i1;
Expand Down
4 changes: 2 additions & 2 deletions src/gp.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ void fitnessinst(Populacao *pop, int i1, int i2, int *champion, int *loser, int
*loser = i1;
}

if (verbose ) fprintf(stderr,"%d %d \n", count++, nota1);
if (verbose) fprintf(stderr,"%d %d \n", count++, nota2);
if (verbose ) fprintf(stderr,"%ld %d \n", count++, nota1);
if (verbose) fprintf(stderr,"%ld %d \n", count++, nota2);


}
Expand Down

0 comments on commit bdeaa09

Please sign in to comment.