1
1

Adding typecasting with intptr_t to remove warnings.

This commit was SVN r28278.
Этот коммит содержится в:
Vishwanath Venkatesan 2013-04-03 17:07:43 +00:00
родитель 701a170387
Коммит 74c418b860
10 изменённых файлов: 32 добавлений и 32 удалений

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

@ -51,11 +51,11 @@ mca_fbtl_posix_ipwritev (mca_io_ompio_file_t *fh,
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;
}
@ -100,7 +100,7 @@ mca_fbtl_posix_ipwritev (mca_io_ompio_file_t *fh,
}
}
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;
@ -121,11 +121,11 @@ mca_fbtl_posix_ipwritev (mca_io_ompio_file_t *fh,
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;
}
@ -169,7 +169,7 @@ mca_fbtl_posix_ipwritev (mca_io_ompio_file_t *fh,
}
}
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;

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

@ -65,7 +65,7 @@ mca_fbtl_posix_preadv (mca_io_ompio_file_t *fh,
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 ++;
}
@ -81,9 +81,9 @@ mca_fbtl_posix_preadv (mca_io_ompio_file_t *fh,
}
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;
@ -111,7 +111,7 @@ mca_fbtl_posix_preadv (mca_io_ompio_file_t *fh,
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 ++;
}
@ -127,9 +127,9 @@ mca_fbtl_posix_preadv (mca_io_ompio_file_t *fh,
}
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;

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

@ -68,7 +68,7 @@ mca_fbtl_posix_pwritev (mca_io_ompio_file_t *fh,
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 ++;
}
@ -84,9 +84,9 @@ mca_fbtl_posix_pwritev (mca_io_ompio_file_t *fh,
}
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;
@ -113,7 +113,7 @@ mca_fbtl_posix_pwritev (mca_io_ompio_file_t *fh,
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 ++;
}
@ -129,9 +129,9 @@ mca_fbtl_posix_pwritev (mca_io_ompio_file_t *fh,
}
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;

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

@ -910,7 +910,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
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 =
@ -928,7 +928,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
}
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 =

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

@ -150,7 +150,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
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;
@ -665,7 +665,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
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 =
@ -680,7 +680,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
}
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 =

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

@ -173,7 +173,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
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;
@ -825,7 +825,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
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 =
@ -840,7 +840,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
}
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 =

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

@ -181,7 +181,7 @@ int ompi_io_ompio_generate_current_file_view (mca_io_ompio_file_t *fh,
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))

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

@ -613,7 +613,7 @@ mca_io_ompio_file_get_byte_offset (ompi_file_t *fh,
}
*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;
}

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

@ -164,7 +164,7 @@ mca_io_ompio_file_read (ompi_file_t *fp,
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 -

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

@ -150,7 +150,7 @@ mca_io_ompio_file_write (ompi_file_t *fp,
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 -