From fc6d940029b26eab087466134f755f2880e8c8d5 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 3 Oct 2012 23:18:31 +0200 Subject: [PATCH] Fix errors about uninitialized variables. Not sure if it is correct but it cannot be worse and, at least, it compiles.. --- src/smpi/smpi_base.c | 3 ++- src/smpi/smpi_mpi_dt.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index dde5b962f6..d29b237c67 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -42,7 +42,7 @@ static MPI_Request build_request(void *buf, int count, { MPI_Request request; - void *old_buf; + void *old_buf = NULL; request = xbt_new(s_smpi_mpi_request_t, 1); @@ -584,6 +584,7 @@ int smpi_mpi_testsome(int incount, MPI_Request requests[], int *indices, MPI_Status *pstat = status == MPI_STATUSES_IGNORE ? MPI_STATUS_IGNORE : &stat; count = 0; + count_dead = 0; for(i = 0; i < incount; i++) { if((requests[i] != MPI_REQUEST_NULL)) { if(smpi_mpi_test(&requests[i], pstat)) { diff --git a/src/smpi/smpi_mpi_dt.c b/src/smpi/smpi_mpi_dt.c index 18f668c2a2..ec3015c460 100644 --- a/src/smpi/smpi_mpi_dt.c +++ b/src/smpi/smpi_mpi_dt.c @@ -386,6 +386,7 @@ int smpi_datatype_struct(int count, int* blocklens, MPI_Aint* indices, MPI_Datat int i; size_t size; //Khalid added this + size = 0; for(i=0; i< count; i++){ if (blocklens[i]<=0) return MPI_ERR_ARG; -- 2.20.1