1
1

The next one who claim that gcc is not a good compiler for the warnings will have to explain me that ...

warning: ISO C forbids conversion of object pointer to function pointer type

The warning was because we try to use the pointer provided by Fortran as is, not the value stored inside this pointer as it should.

This commit was SVN r3189.
Этот коммит содержится в:
George Bosilca 2004-10-16 18:31:27 +00:00
родитель 2d5c0d1edc
Коммит 116654c1c1
11 изменённых файлов: 24 добавлений и 25 удалений

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

@ -51,8 +51,8 @@ void mpi_comm_create_errhandler_f(MPI_Fint *function,
{
MPI_Errhandler c_errhandler;
*ierr =
OMPI_INT_2_FINT(MPI_Comm_create_errhandler((MPI_Comm_errhandler_fn *)
function, &c_errhandler));
*ierr = OMPI_INT_2_FINT(
MPI_Comm_create_errhandler( (MPI_Comm_errhandler_fn*)*function,
&c_errhandler));
*errhandler = MPI_Errhandler_c2f(c_errhandler);
}

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

@ -58,8 +58,8 @@ void mpi_comm_create_keyval_f(MPI_Fint *comm_copy_attr_fn,
ompi_attribute_fn_ptr_union_t copy_fn;
ompi_attribute_fn_ptr_union_t del_fn;
copy_fn.attr_F_copy_fn = (MPI_F_copy_function *)comm_copy_attr_fn;
del_fn.attr_F_delete_fn = (MPI_F_delete_function *)comm_delete_attr_fn;
copy_fn.attr_F_copy_fn = (MPI_F_copy_function *)*comm_copy_attr_fn;
del_fn.attr_F_delete_fn = (MPI_F_delete_function *)*comm_delete_attr_fn;
ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, del_fn,
comm_keyval, extra_state, OMPI_KEYVAL_F77);

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

@ -51,8 +51,8 @@ void mpi_errhandler_create_f(MPI_Fint *function,
{
MPI_Errhandler c_errhandler;
*ierr = OMPI_INT_2_FINT(MPI_Errhandler_create((MPI_Handler_function *)
function,
*ierr = OMPI_INT_2_FINT(MPI_Errhandler_create(
(MPI_Handler_function *)*function,
&c_errhandler));
*errhandler = MPI_Errhandler_c2f(c_errhandler);
}

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

@ -51,9 +51,8 @@ void mpi_file_create_errhandler_f(MPI_Fint *function,
{
MPI_Errhandler c_errhandler;
*ierr =
OMPI_INT_2_FINT(MPI_File_create_errhandler((MPI_File_errhandler_fn *)
function,
*ierr = OMPI_INT_2_FINT(MPI_File_create_errhandler(
(MPI_File_errhandler_fn *)*function,
&c_errhandler));
*errhandler = MPI_Errhandler_c2f(c_errhandler);

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

@ -52,9 +52,9 @@ void mpi_grequest_start_f(MPI_Fint *query_fn, MPI_Fint *free_fn,
{
MPI_Request c_req;
*ierr = OMPI_INT_2_FINT(MPI_Grequest_start(
(MPI_Grequest_query_function *)query_fn,
(MPI_Grequest_free_function *)free_fn,
(MPI_Grequest_cancel_function *)cancel_fn,
(MPI_Grequest_query_function *)*query_fn,
(MPI_Grequest_free_function *)*free_fn,
(MPI_Grequest_cancel_function *)*cancel_fn,
extra_state, &c_req));
if (MPI_SUCCESS == *ierr) {

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

@ -56,8 +56,8 @@ void mpi_keyval_create_f(MPI_Fint *copy_attr_fn, MPI_Fint *delete_attr_fn,
ompi_attribute_fn_ptr_union_t copy_fn;
ompi_attribute_fn_ptr_union_t del_fn;
copy_fn.attr_F_copy_fn = (MPI_F_copy_function *)copy_attr_fn;
del_fn.attr_F_delete_fn = (MPI_F_delete_function *)delete_attr_fn;
copy_fn.attr_F_copy_fn = (MPI_F_copy_function *)*copy_attr_fn;
del_fn.attr_F_delete_fn = (MPI_F_delete_function *)*delete_attr_fn;
ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, del_fn,
keyval, extra_state, OMPI_KEYVAL_F77);

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

@ -52,7 +52,7 @@ void mpi_op_create_f(MPI_Fint *function, MPI_Fint *commute,
{
MPI_Op c_op;
*ierr = OMPI_INT_2_FINT(MPI_Op_create((MPI_User_function *)function,
*ierr = OMPI_INT_2_FINT(MPI_Op_create((MPI_User_function *)*function,
OMPI_FINT_2_INT(*commute),
&c_op));
c_op->o_flags |= OMPI_OP_FLAGS_FORTRAN_FUNC;

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

@ -52,8 +52,8 @@ void mpi_register_datarep_f(char *datarep, MPI_Fint *read_conversion_fn,
MPI_Fint *ierr)
{
*ierr = OMPI_INT_2_FINT(MPI_Register_datarep(datarep,
(MPI_Datarep_conversion_function *)read_conversion_fn,
(MPI_Datarep_conversion_function *)write_conversion_fn,
(MPI_Datarep_extent_function *)dtype_file_extent_fn,
(MPI_Datarep_conversion_function *)*read_conversion_fn,
(MPI_Datarep_conversion_function *)*write_conversion_fn,
(MPI_Datarep_extent_function *)*dtype_file_extent_fn,
extra_state));
}

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

@ -55,8 +55,8 @@ void mpi_type_create_keyval_f(MPI_Fint *type_copy_attr_fn, MPI_Fint *type_delete
ompi_attribute_fn_ptr_union_t copy_fn;
ompi_attribute_fn_ptr_union_t del_fn;
copy_fn.attr_F_copy_fn = (MPI_F_copy_function *)type_copy_attr_fn;
del_fn.attr_F_delete_fn = (MPI_F_delete_function *)type_delete_attr_fn;
copy_fn.attr_F_copy_fn = (MPI_F_copy_function *)*type_copy_attr_fn;
del_fn.attr_F_delete_fn = (MPI_F_delete_function *)*type_delete_attr_fn;
ret = ompi_attr_create_keyval(TYPE_ATTR, copy_fn, del_fn,
type_keyval, extra_state, OMPI_KEYVAL_F77);

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

@ -46,13 +46,13 @@ OMPI_GENERATE_F77_BINDINGS (MPI_WIN_CREATE_ERRHANDLER,
#include "mpi/f77/profile/defines.h"
#endif
void mpi_win_create_errhandler_f(MPI_Fint *f,
void mpi_win_create_errhandler_f(MPI_Fint *function,
MPI_Fint *errhandler, MPI_Fint *ierr)
{
MPI_Errhandler c_errhandler;
*ierr =
OMPI_INT_2_FINT(MPI_Win_create_errhandler((MPI_Win_errhandler_fn*) f,
OMPI_INT_2_FINT(MPI_Win_create_errhandler((MPI_Win_errhandler_fn*)*function,
&c_errhandler));
*errhandler = MPI_Errhandler_c2f(c_errhandler);

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

@ -55,8 +55,8 @@ void mpi_win_create_keyval_f(MPI_Fint *win_copy_attr_fn, MPI_Fint *win_delete_at
ompi_attribute_fn_ptr_union_t copy_fn;
ompi_attribute_fn_ptr_union_t del_fn;
copy_fn.attr_F_copy_fn = (MPI_F_copy_function *)win_copy_attr_fn;
del_fn.attr_F_delete_fn = (MPI_F_delete_function *)win_delete_attr_fn;
copy_fn.attr_F_copy_fn = (MPI_F_copy_function *)*win_copy_attr_fn;
del_fn.attr_F_delete_fn = (MPI_F_delete_function *)*win_delete_attr_fn;
ret = ompi_attr_create_keyval(WIN_ATTR, copy_fn, del_fn,
win_keyval, extra_state, OMPI_KEYVAL_F77);