Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore external cast-function-type warnings #14760

Merged
merged 1 commit into from Feb 8, 2023

Conversation

tjhei
Copy link
Member

@tjhei tjhei commented Feb 7, 2023

When building on Ubuntu 22.04 (gcc 11.3) with OpenMPI I am getting the following warnings:

[ 58%] Building CXX object
source/base/CMakeFiles/obj_base_release.dir/symbolic_function.cc.o
In file included from
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h:277,
from
/usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h:2887,
from
/home/runner/dealii-candi/tmp/build/deal.II-master/include/deal.II/base/config.h:576,
from
/home/runner/dealii-candi/tmp/unpack/deal.II-master/include/deal.II/base/symbolic_function.templates.h:19,
from
/home/runner/dealii-candi/tmp/unpack/deal.II-master/source/base/symbolic_function.cc:16:
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h:
In member function ‘virtual void MPI::Op::Init(void (*)(const void*,
void*, int, const MPI::Datatype&), bool)’:
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h:121:25:
warning: cast between incompatible function types from ‘void (*)(void*,
void*, int*, ompi_datatype_t**, void (*)(void*, void*, int*,
ompi_datatype_t**))’ to ‘void (*)(void*, void*, int*,
ompi_datatype_t**)’ [-Wcast-function-type]
  121 |     (void)MPI_Op_create((MPI_User_function*)

The code in question doesn't look correct, but we are not using the c++ wrappers anyways.

When building on Ubuntu 22.04 (gcc 11.3) with OpenMPI I am getting the
following warnings:
```
[ 58%] Building CXX object
source/base/CMakeFiles/obj_base_release.dir/symbolic_function.cc.o
In file included from
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h:277,
from
/usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h:2887,
from
/home/runner/dealii-candi/tmp/build/deal.II-master/include/deal.II/base/config.h:576,
from
/home/runner/dealii-candi/tmp/unpack/deal.II-master/include/deal.II/base/symbolic_function.templates.h:19,
from
/home/runner/dealii-candi/tmp/unpack/deal.II-master/source/base/symbolic_function.cc:16:
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h:
In member function ‘virtual void MPI::Op::Init(void (*)(const void*,
void*, int, const MPI::Datatype&), bool)’:
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h:121:25:
warning: cast between incompatible function types from ‘void (*)(void*,
void*, int*, ompi_datatype_t**, void (*)(void*, void*, int*,
ompi_datatype_t**))’ to ‘void (*)(void*, void*, int*,
ompi_datatype_t**)’ [-Wcast-function-type]
  121 |     (void)MPI_Op_create((MPI_User_function*)
```
The code in question doesn't look correct, but we are not using the c++
wrappers anyways.
@tjhei
Copy link
Member Author

tjhei commented Feb 7, 2023

failing tests are unrelated.

@bangerth
Copy link
Member

bangerth commented Feb 8, 2023

This must surely be one of the harder to read error messages: cast between incompatible function types from ‘void (*)(void*,void*, int*, ompi_datatype_t**, void (*)(void*, void*, int*, ompi_datatype_t**))’ to ‘void (*)(void*, void*, int*, ompi_datatype_t**)’

@bangerth bangerth merged commit 3d55da8 into dealii:master Feb 8, 2023
@tjhei tjhei deleted the diag-ignore-cast-function-type branch February 9, 2023 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants