From bdeaa09c8be8840389269f163e52fa7f3f1180ef Mon Sep 17 00:00:00 2001 From: Trumae Date: Tue, 17 Aug 2010 22:31:54 -0300 Subject: [PATCH] Warnings removeds --- src/fitexternal.c | 7 ++++--- src/fitmult.c | 4 ++-- src/gp.c | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/fitexternal.c b/src/fitexternal.c index 65d78ed..f6c7bb0 100644 --- a/src/fitexternal.c +++ b/src/fitexternal.c @@ -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){ @@ -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){ @@ -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; diff --git a/src/fitmult.c b/src/fitmult.c index 43298f4..4d67ae9 100644 --- a/src/fitmult.c +++ b/src/fitmult.c @@ -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; diff --git a/src/gp.c b/src/gp.c index df38d4d..2eda368 100644 --- a/src/gp.c +++ b/src/gp.c @@ -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); }