1
1

typecasting with intptr_t to remove warnings

This commit was SVN r28276.
Этот коммит содержится в:
Vishwanath Venkatesan 2013-04-03 17:06:02 +00:00
родитель 5c56f6f857
Коммит 784337aab1
3 изменённых файлов: 19 добавлений и 19 удалений

Просмотреть файл

@ -259,7 +259,7 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh,
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)
@ -289,9 +289,9 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh,
}
#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",
@ -654,9 +654,9 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh,
&(others_req[i].mem_ptrs[j]));
send_size[i] += (int)(OMPIO_MIN(real_off + real_size - req_off,
(OMPI_MPI_OFFSET_TYPE)(unsigned)req_len));
(OMPI_MPI_OFFSET_TYPE)req_len));
if (real_off+real_size-req_off < (OMPI_MPI_OFFSET_TYPE)(unsigned)req_len) {
if (real_off+real_size-req_off < (OMPI_MPI_OFFSET_TYPE)req_len) {
partial_send[i] = (int) (real_off + real_size - req_off);
if ((j+1 < others_req[i].count) &&
(others_req[i].offsets[j+1] <
@ -693,7 +693,7 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh,
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;
@ -1029,7 +1029,7 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh,
n_buftypes++; \
} \
user_buf_idx = flat_buf->indices[flat_buf_idx] + \
(OMPI_MPI_OFFSET_TYPE)n_buftypes*(OMPI_MPI_OFFSET_TYPE)buftype_extent; \
(OMPI_MPI_OFFSET_TYPE)n_buftypes*(OMPI_MPI_OFFSET_TYPE)buftype_extent; \
flat_buf_sz = flat_buf->blocklens[flat_buf_idx]; \
} \
size -= size_in_buf; \
@ -1086,7 +1086,7 @@ static void two_phase_fill_user_buffer(mca_io_ompio_file_t *fh,
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 */

Просмотреть файл

@ -285,8 +285,8 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh,
local_size = iov_count/count;
flat_buf->indices =
(OMPI_MPI_OFFSET_TYPE *)malloc(local_size *
sizeof(OMPI_MPI_OFFSET_TYPE));
(OMPI_MPI_OFFSET_TYPE *)malloc(local_size *
sizeof(OMPI_MPI_OFFSET_TYPE));
if ( NULL == flat_buf->indices ){
ret = OMPI_ERR_OUT_OF_RESOURCE;
goto exit;
@ -304,7 +304,7 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh,
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;
@ -334,8 +334,8 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh,
#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
@ -790,7 +790,7 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh,
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;
@ -1038,7 +1038,7 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh,
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;
@ -1250,7 +1250,7 @@ static int two_phase_fill_send_buffer(mca_io_ompio_file_t *fh,
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;

Просмотреть файл

@ -374,7 +374,7 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh,
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);
@ -426,7 +426,7 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh,
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,