Skip to content

Commit fc0eeb4

Browse files
committed
mpi/cxx: fix warnings
Signed-off-by: Nathan Hjelm <[email protected]> (cherry picked from commit ab0a005) Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 0495dc6 commit fc0eeb4

File tree

5 files changed

+10
-15
lines changed

5 files changed

+10
-15
lines changed

ompi/mpi/cxx/comm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ MPI::Comm::Comm(const Comm_Null& data) : Comm_Null(data)
5151
MPI::Errhandler
5252
MPI::Comm::Create_errhandler(MPI::Comm::_MPI2CPP_ERRHANDLERFN_* function)
5353
{
54-
return ompi_cxx_errhandler_create_comm ((void *) function);
54+
return ompi_cxx_errhandler_create_comm ((ompi_cxx_dummy_fn_t *) function);
5555
}
5656

5757

ompi/mpi/cxx/cxx_glue.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ int ompi_cxx_attr_create_keyval_type (MPI_Type_copy_attr_function *copy_fn,
9292
return ompi_attr_create_keyval (TYPE_ATTR, copy_fn_u, delete_fn_u, keyval, extra_state, 0, NULL);
9393
}
9494

95-
MPI_Errhandler ompi_cxx_errhandler_create_comm (void *fn)
95+
MPI_Errhandler ompi_cxx_errhandler_create_comm (ompi_cxx_dummy_fn_t *fn)
9696
{
9797
ompi_errhandler_t *errhandler;
9898
errhandler = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_COMM,
@@ -103,7 +103,7 @@ MPI_Errhandler ompi_cxx_errhandler_create_comm (void *fn)
103103
return errhandler;
104104
}
105105

106-
MPI_Errhandler ompi_cxx_errhandler_create_win (void *fn)
106+
MPI_Errhandler ompi_cxx_errhandler_create_win (ompi_cxx_dummy_fn_t *fn)
107107
{
108108
ompi_errhandler_t *errhandler;
109109
errhandler = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_WIN,
@@ -115,7 +115,7 @@ MPI_Errhandler ompi_cxx_errhandler_create_win (void *fn)
115115
}
116116

117117
#if OMPI_PROVIDE_MPI_FILE_INTERFACE
118-
MPI_Errhandler ompi_cxx_errhandler_create_file (void *fn)
118+
MPI_Errhandler ompi_cxx_errhandler_create_file (ompi_cxx_dummy_fn_t *fn)
119119
{
120120
ompi_errhandler_t *errhandler;
121121
errhandler = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_FILE,
@@ -147,12 +147,6 @@ ompi_cxx_intercept_file_extra_state_t
147147
return &intercept->state;
148148
}
149149

150-
void ompi_cxx_errhandler_set_dispatch_fn (ompi_errhandler_t *errhandler,
151-
ompi_errhandler_cxx_dispatch_fn_t *dispatch_fn)
152-
{
153-
errhandler->eh_cxx_dispatch_fn = dispatch_fn;
154-
}
155-
156150
void ompi_cxx_errhandler_set_callbacks (struct ompi_errhandler_t *errhandler, MPI_Comm_errhandler_function *eh_comm_fn,
157151
ompi_file_errhandler_fn *eh_file_fn, MPI_Win_errhandler_function *eh_win_fn)
158152
{

ompi/mpi/cxx/cxx_glue.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ extern struct ompi_predefined_errhandler_t ompi_mpi_errors_throw_exceptions;
4949
*/
5050
typedef void (ompi_errhandler_cxx_dispatch_fn_t)(void *handle, int *err_code,
5151
const char *message, ompi_errhandler_generic_handler_fn_t *fn);
52+
typedef void (ompi_cxx_dummy_fn_t) (void);
5253

5354
ompi_cxx_communicator_type_t ompi_cxx_comm_get_type (MPI_Comm comm);
5455

@@ -74,9 +75,9 @@ void ompi_mpi_cxx_file_errhandler_invoke (MPI_File *mpi_comm, int *err,
7475
const char *message, void *file_fn);
7576
#endif
7677

77-
MPI_Errhandler ompi_cxx_errhandler_create_comm (void *fn);
78-
MPI_Errhandler ompi_cxx_errhandler_create_win (void *fn);
79-
MPI_Errhandler ompi_cxx_errhandler_create_file (void *fn);
78+
MPI_Errhandler ompi_cxx_errhandler_create_comm (ompi_cxx_dummy_fn_t *fn);
79+
MPI_Errhandler ompi_cxx_errhandler_create_win (ompi_cxx_dummy_fn_t *fn);
80+
MPI_Errhandler ompi_cxx_errhandler_create_file (ompi_cxx_dummy_fn_t *fn);
8081

8182
ompi_cxx_intercept_file_extra_state_t
8283
*ompi_cxx_new_intercept_state (void *read_fn_cxx, void *write_fn_cxx, void *extent_fn_cxx,

ompi/mpi/cxx/file.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ MPI::File::Close()
2828
MPI::Errhandler
2929
MPI::File::Create_errhandler(MPI::File::Errhandler_function* function)
3030
{
31-
return ompi_cxx_errhandler_create_file ((void *) function);
31+
return ompi_cxx_errhandler_create_file ((ompi_cxx_dummy_fn_t *) function);
3232
}
3333

3434

ompi/mpi/cxx/win.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ MPI::Win::Free()
2828
MPI::Errhandler
2929
MPI::Win::Create_errhandler(MPI::Win::Errhandler_function* function)
3030
{
31-
return ompi_cxx_errhandler_create_win ((void *) function);
31+
return ompi_cxx_errhandler_create_win ((ompi_cxx_dummy_fn_t *) function);
3232
}
3333

3434

0 commit comments

Comments
 (0)