Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix errors about uninitialized variables.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 3 Oct 2012 21:18:31 +0000 (23:18 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 3 Oct 2012 21:30:56 +0000 (23:30 +0200)
Not sure if it is correct but it cannot be worse and, at least,
it compiles..

src/smpi/smpi_base.c
src/smpi/smpi_mpi_dt.c

index dde5b96..d29b237 100644 (file)
@@ -42,7 +42,7 @@ static MPI_Request build_request(void *buf, int count,
 {
   MPI_Request request;
 
 {
   MPI_Request request;
 
-  void *old_buf;
+  void *old_buf = NULL;
 
   request = xbt_new(s_smpi_mpi_request_t, 1);
 
 
   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;
   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)) {
   for(i = 0; i < incount; i++) {
     if((requests[i] != MPI_REQUEST_NULL)) {
       if(smpi_mpi_test(&requests[i], pstat)) {
index 18f668c..ec3015c 100644 (file)
@@ -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
 
   int i;
   size_t size; //Khalid added this
 
+  size = 0;
   for(i=0; i< count; i++){
     if (blocklens[i]<=0)
       return MPI_ERR_ARG;
   for(i=0; i< count; i++){
     if (blocklens[i]<=0)
       return MPI_ERR_ARG;