Commits

Ralph Castain committed 6c2fbd2 Draft

Fixes #3553: Fixing warnings due to type casting on 32bit machines

Uses provided patch

Comments (0)

Files changed (13)

ompi/mca/fbtl/posix/fbtl_posix_ipwritev.c

     if (NULL != sorted) {
         for (i=0 ; i<fh->f_num_of_io_entries ; i++) {
             if (fh->f_num_of_io_entries != i+1) {
-                if (((OMPI_MPI_OFFSET_TYPE)fh->f_io_array[sorted[i]].offset + 
+	      if (((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[sorted[i]].offset + 
                      (OPAL_PTRDIFF_TYPE)fh->f_io_array[sorted[i]].length) == 
-                    (OMPI_MPI_OFFSET_TYPE)fh->f_io_array[sorted[i+1]].offset) {
+		  (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[sorted[i+1]].offset) {
                     if (!merge) {
-                        merge_offset = (OMPI_MPI_OFFSET_TYPE)
+		      merge_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)
                             fh->f_io_array[sorted[i]].offset;
                         merge_length = fh->f_io_array[sorted[i]].length;
                     }
                 }
             }
             else {
-                aiocbp[num_req].aio_offset  = (OMPI_MPI_OFFSET_TYPE)
+	      aiocbp[num_req].aio_offset  = (OMPI_MPI_OFFSET_TYPE)(intptr_t)
                     fh->f_io_array[sorted[i]].offset;
                 aiocbp[num_req].aio_buf     = 
                     fh->f_io_array[sorted[i]].memory_address;
     else {
         for (i=0 ; i<fh->f_num_of_io_entries ; i++) {
             if (fh->f_num_of_io_entries != i+1) {
-                if (((OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i].offset + 
+	      if (((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset + 
                      (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == 
-                    (OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i+1].offset) {
+		  (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i+1].offset) {
                     if (!merge) {
-                        merge_offset = (OMPI_MPI_OFFSET_TYPE)
+		      merge_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)
                             fh->f_io_array[i].offset;
                         merge_length = fh->f_io_array[i].length;
                     }
                 }
             }
             else {
-                aiocbp[num_req].aio_offset  = (OMPI_MPI_OFFSET_TYPE)
+	      aiocbp[num_req].aio_offset  = (OMPI_MPI_OFFSET_TYPE)(intptr_t)
                     fh->f_io_array[i].offset;
                 aiocbp[num_req].aio_buf     = fh->f_io_array[i].memory_address;
                 aiocbp[num_req].aio_nbytes  = fh->f_io_array[i].length;

ompi/mca/fbtl/posix/fbtl_posix_preadv.c

             if (0 == iov_count) {
                 iov[iov_count].iov_base = fh->f_io_array[sorted[i]].memory_address;
                 iov[iov_count].iov_len = fh->f_io_array[sorted[i]].length;
-                iov_offset = (OMPI_MPI_OFFSET_TYPE)fh->f_io_array[sorted[i]].offset;
+                iov_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[sorted[i]].offset;
                 iov_count ++;
             }
 
             }
 
             if (fh->f_num_of_io_entries != i+1) {
-                if (((OMPI_MPI_OFFSET_TYPE)fh->f_io_array[sorted[i]].offset + 
+	      if (((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[sorted[i]].offset + 
                      (OPAL_PTRDIFF_TYPE)fh->f_io_array[sorted[i]].length) == 
-                    (OMPI_MPI_OFFSET_TYPE)fh->f_io_array[sorted[i+1]].offset) {                    
+		  (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[sorted[i+1]].offset) {                    
                     iov[iov_count].iov_base = 
                         fh->f_io_array[sorted[i+1]].memory_address;
                     iov[iov_count].iov_len = fh->f_io_array[sorted[i+1]].length;
             if (0 == iov_count) {
                 iov[iov_count].iov_base = fh->f_io_array[i].memory_address;
                 iov[iov_count].iov_len = fh->f_io_array[i].length;
-                iov_offset = (OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i].offset;
+                iov_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset;
                 iov_count ++;
             }
 
             }
 
             if (fh->f_num_of_io_entries != i+1) {
-                if (((OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i].offset + 
+	      if (((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset + 
                      (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == 
-                    (OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i+1].offset) {                    
+		  (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i+1].offset) {                    
                     iov[iov_count].iov_base = 
                         fh->f_io_array[i+1].memory_address;
                     iov[iov_count].iov_len = fh->f_io_array[i+1].length;

ompi/mca/fbtl/posix/fbtl_posix_pwritev.c

             if (0 == iov_count) {
                 iov[iov_count].iov_base = fh->f_io_array[sorted[i]].memory_address;
                 iov[iov_count].iov_len = fh->f_io_array[sorted[i]].length;
-                iov_offset = (OMPI_MPI_OFFSET_TYPE)fh->f_io_array[sorted[i]].offset;
+                iov_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[sorted[i]].offset;
                 iov_count ++;
             }
 
             }
 
             if (fh->f_num_of_io_entries != i+1) {
-                if (((OMPI_MPI_OFFSET_TYPE)fh->f_io_array[sorted[i]].offset + 
+	      if (((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[sorted[i]].offset + 
                      (OPAL_PTRDIFF_TYPE)fh->f_io_array[sorted[i]].length) == 
-                    (OMPI_MPI_OFFSET_TYPE)fh->f_io_array[sorted[i+1]].offset) {
+		  (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[sorted[i+1]].offset) {
                     iov[iov_count].iov_base = 
                         fh->f_io_array[sorted[i+1]].memory_address;
                     iov[iov_count].iov_len = fh->f_io_array[sorted[i+1]].length;
             if (0 == iov_count) {
                 iov[iov_count].iov_base = fh->f_io_array[i].memory_address;
                 iov[iov_count].iov_len = fh->f_io_array[i].length;
-                iov_offset = (OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i].offset;
+                iov_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset;
                 iov_count ++;
             }
 
             }
 
             if (fh->f_num_of_io_entries != i+1) {
-                if (((OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i].offset + 
+	      if (((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset + 
                      (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == 
-                    (OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i+1].offset) {
+		  (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i+1].offset) {
                     iov[iov_count].iov_base = 
                         fh->f_io_array[i+1].memory_address;
                     iov[iov_count].iov_len = fh->f_io_array[i+1].length;

ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c

 	  fh->f_num_of_io_entries = 0;
 	  /*First entry for every aggregator*/
 	  fh->f_io_array[fh->f_num_of_io_entries].offset = 
-	    (IOVBASE_TYPE *)file_offsets_for_agg[sorted_file_offsets[0]].offset;
+	    (IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[0]].offset;
 	  fh->f_io_array[fh->f_num_of_io_entries].length = 
 	    file_offsets_for_agg[sorted_file_offsets[0]].length;
 	  fh->f_io_array[fh->f_num_of_io_entries].memory_address = 
 	    }
 	    else {
 	      fh->f_io_array[fh->f_num_of_io_entries].offset = 
-		(IOVBASE_TYPE *)file_offsets_for_agg[sorted_file_offsets[i]].offset;
+		(IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[i]].offset;
 	      fh->f_io_array[fh->f_num_of_io_entries].length = 
 		file_offsets_for_agg[sorted_file_offsets[i]].length;
 	      fh->f_io_array[fh->f_num_of_io_entries].memory_address = 

ompi/mca/fcoll/static/fcoll_static_file_read_all.c

   
 
   for (j=0; j < iov_size; j++){
-    local_iov_array[j].offset = (OMPI_MPI_OFFSET_TYPE)
+    local_iov_array[j].offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)
       iov[j].iov_base;
     local_iov_array[j].length = (size_t)iov[j].iov_len;
     local_iov_array[j].process_id = fh->f_rank;
 
       fh->f_num_of_io_entries = 0;
       fh->f_io_array[fh->f_num_of_io_entries].offset = 
-	(IOVBASE_TYPE *)file_offsets_for_agg[sorted_file_offsets[0]].offset;
+	(IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[0]].offset;
       fh->f_io_array[fh->f_num_of_io_entries].length = 
 	file_offsets_for_agg[sorted_file_offsets[0]].length;
       fh->f_io_array[fh->f_num_of_io_entries].memory_address = 
 	}
 	else{
 	  fh->f_io_array[fh->f_num_of_io_entries].offset = 
-	    (IOVBASE_TYPE *)file_offsets_for_agg[sorted_file_offsets[i]].offset;
+	    (IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[i]].offset;
 	  fh->f_io_array[fh->f_num_of_io_entries].length = 
 	    file_offsets_for_agg[sorted_file_offsets[i]].length;
 	  fh->f_io_array[fh->f_num_of_io_entries].memory_address = 

ompi/mca/fcoll/static/fcoll_static_file_write_all.c

   
   
   for (j=0; j < iov_size; j++){
-    local_iov_array[j].offset = (OMPI_MPI_OFFSET_TYPE)
+    local_iov_array[j].offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)
       iov[j].iov_base;
     local_iov_array[j].length = (size_t)iov[j].iov_len;
     local_iov_array[j].process_id = fh->f_rank;
 	fh->f_num_of_io_entries = 0;
 	/*First entry for every aggregator*/
       fh->f_io_array[fh->f_num_of_io_entries].offset = 
-	  (IOVBASE_TYPE *)file_offsets_for_agg[sorted_file_offsets[0]].offset;
+	(IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[0]].offset;
       fh->f_io_array[fh->f_num_of_io_entries].length = 
 	  file_offsets_for_agg[sorted_file_offsets[0]].length;
       fh->f_io_array[fh->f_num_of_io_entries].memory_address = 
 	  }
 	  else {
 	      fh->f_io_array[fh->f_num_of_io_entries].offset = 
-		(IOVBASE_TYPE *)file_offsets_for_agg[sorted_file_offsets[i]].offset;
+		(IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[i]].offset;
 	      fh->f_io_array[fh->f_num_of_io_entries].length = 
 		  file_offsets_for_agg[sorted_file_offsets[i]].length;
 	      fh->f_io_array[fh->f_num_of_io_entries].memory_address = 

ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c

     flat_buf->count = local_size;    
     i=0;j=0;
     while(j < local_size){
-      flat_buf->indices[j] = (OMPI_MPI_OFFSET_TYPE)decoded_iov[i].iov_base;
+      flat_buf->indices[j] = (OMPI_MPI_OFFSET_TYPE)(intptr_t)decoded_iov[i].iov_base;
       flat_buf->blocklens[j] = decoded_iov[i].iov_len;
       
       if(i < (int)iov_count)
   }
 #endif
   
-  start_offset = (OMPI_MPI_OFFSET_TYPE)iov[0].iov_base;
-  end_offset = (OMPI_MPI_OFFSET_TYPE)iov[local_count-1].iov_base +
-    (OMPI_MPI_OFFSET_TYPE)iov[local_count-1].iov_len - 1; 
+  start_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)iov[0].iov_base;
+  end_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)iov[local_count-1].iov_base +
+    (OMPI_MPI_OFFSET_TYPE)(intptr_t)iov[local_count-1].iov_len - 1; 
   
 #if DEBUG
   printf("%d: START OFFSET:%ld, END OFFSET:%ld\n",
 	opal_output(1, "OUT OF MEMORY\n");
 	return OMPI_ERR_OUT_OF_RESOURCE;
       }
-      fh->f_io_array[0].offset = (IOVBASE_TYPE *) off;
+      fh->f_io_array[0].offset = (IOVBASE_TYPE *) (intptr_t)off;
       fh->f_io_array[0].length = len;
       fh->f_io_array[0].memory_address = 
 	read_buf+for_curr_iter;
   
   for (i=0; i<contig_access_count; i++) { 
     
-    off     = (OMPI_MPI_OFFSET_TYPE)offset_length[i].iov_base;
+    off     = (OMPI_MPI_OFFSET_TYPE)(intptr_t)offset_length[i].iov_base;
     rem_len = (OMPI_MPI_OFFSET_TYPE)offset_length[i].iov_len;
     
     /* this request may span the file domains of more than one process */

ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c

        flat_buf->count = local_size;
        i=0;j=0;
        while(j < local_size){
-	   flat_buf->indices[j] = (OMPI_MPI_OFFSET_TYPE)decoded_iov[i].iov_base;
+	 flat_buf->indices[j] = (OMPI_MPI_OFFSET_TYPE)(intptr_t)decoded_iov[i].iov_base;
 	   flat_buf->blocklens[j] = decoded_iov[i].iov_len;
 	   if(i < (int)iov_count)
 	     i+=1;
     
 #endif
     
-    start_offset = (OMPI_MPI_OFFSET_TYPE)iov[0].iov_base;
-    end_offset = (OMPI_MPI_OFFSET_TYPE)iov[local_count-1].iov_base +
+    start_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)iov[0].iov_base;
+    end_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)iov[local_count-1].iov_base +
 	(OMPI_MPI_OFFSET_TYPE)iov[local_count-1].iov_len - 1; 
     
 #if DEBUG_ON
 		return OMPI_ERR_OUT_OF_RESOURCE;
 	    }
 
-	    fh->f_io_array[0].offset  =(IOVBASE_TYPE *) off;
+	    fh->f_io_array[0].offset  =(IOVBASE_TYPE *)(intptr_t)off;
 	    fh->f_io_array[0].length = len;
 	    fh->f_io_array[0].memory_address = write_buf;
 	    fh->f_num_of_io_entries = 1;
 		    opal_output(1, "OUT OF MEMORY\n");
 		    return OMPI_ERR_OUT_OF_RESOURCE;
 		}
-		fh->f_io_array[0].offset  =(IOVBASE_TYPE *) off;
+		fh->f_io_array[0].offset  =(IOVBASE_TYPE *)(intptr_t)off;
 		fh->f_num_of_io_entries = 1;
 		fh->f_io_array[0].length = size;
 		fh->f_io_array[0].memory_address = write_buf;
     
     for (i=0; i<contig_access_count; i++) { 
 	
-	off     = (OMPI_MPI_OFFSET_TYPE)offset_length[i].iov_base;
+      off     = (OMPI_MPI_OFFSET_TYPE)(intptr_t)offset_length[i].iov_base;
 	rem_len = (OMPI_MPI_OFFSET_TYPE)offset_length[i].iov_len;
 	
 

ompi/mca/fcoll/two_phase/fcoll_two_phase_support_fns.c

 
 	if (offset_len[i].iov_len==0)
 	    continue;
-	off = (OMPI_MPI_OFFSET_TYPE)offset_len[i].iov_base;
+	off = (OMPI_MPI_OFFSET_TYPE)(intptr_t)offset_len[i].iov_base;
 	fd_len = (OMPI_MPI_OFFSET_TYPE)offset_len[i].iov_len;
 	proc = mca_fcoll_two_phase_calc_aggregator(fh, off, min_st_offset, &fd_len, fd_size, 
 					     fd_start, fd_end, striping_unit, num_aggregators,aggregator_list);
     for (i=0; i<contig_access_count; i++) { 
 	if ((int)offset_len[i].iov_len == 0)
 	    continue;
-	off = (OMPI_MPI_OFFSET_TYPE)offset_len[i].iov_base;
+	off = (OMPI_MPI_OFFSET_TYPE)(intptr_t)offset_len[i].iov_base;
 	fd_len = (OMPI_MPI_OFFSET_TYPE)offset_len[i].iov_len;
  	proc = mca_fcoll_two_phase_calc_aggregator(fh, off, min_st_offset, &fd_len,
 					     fd_size, fd_start, fd_end,

ompi/mca/io/ompio/io_ompio.c

 	
         disp = (OPAL_PTRDIFF_TYPE)(fh->f_decoded_iov[j].iov_base) + 
             (fh->f_total_bytes - sum_previous_counts);
-        iov[k].iov_base = (IOVBASE_TYPE *)(disp + fh->f_offset);
+        iov[k].iov_base = (IOVBASE_TYPE *)(intptr_t)(disp + fh->f_offset);
 
         if ((fh->f_decoded_iov[j].iov_len - 
              (fh->f_total_bytes - sum_previous_counts)) 

ompi/mca/io/ompio/io_ompio_file_open.c

     }
 
     *disp = data->ompio_fh.f_disp + temp_offset +
-        (OMPI_MPI_OFFSET_TYPE)data->ompio_fh.f_decoded_iov[index].iov_base;
+      (OMPI_MPI_OFFSET_TYPE)(intptr_t)data->ompio_fh.f_decoded_iov[index].iov_base;
 
     return OMPI_SUCCESS;
 }

ompi/mca/io/ompio/io_ompio_file_read.c

 
             disp = (OPAL_PTRDIFF_TYPE)fh->f_decoded_iov[j].iov_base + 
                 (fh->f_total_bytes - sum_previous_length);
-            fh->f_io_array[k].offset = (IOVBASE_TYPE *)(disp + fh->f_offset);
+            fh->f_io_array[k].offset = (IOVBASE_TYPE *)(intptr_t)(disp + fh->f_offset);
             
             if (! (fh->f_flags & OMPIO_CONTIGUOUS_FVIEW)) {
                 if (fh->f_decoded_iov[j].iov_len - 

ompi/mca/io/ompio/io_ompio_file_write.c

 
             disp = (OPAL_PTRDIFF_TYPE)fh->f_decoded_iov[j].iov_base + 
                 (fh->f_total_bytes - sum_previous_length);
-            fh->f_io_array[k].offset = (IOVBASE_TYPE *)(disp + fh->f_offset);
+            fh->f_io_array[k].offset = (IOVBASE_TYPE *)(intptr_t)(disp + fh->f_offset);
 
             if (! (fh->f_flags & OMPIO_CONTIGUOUS_FVIEW)) { 
                 if (fh->f_decoded_iov[j].iov_len - 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.