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

Fix a bogus warning about a null pointer in a lambda. #13289

Merged
merged 1 commit into from
Jan 25, 2022

Commits on Jan 24, 2022

  1. Fix a bogus warning about a null pointer in a lambda.

    I get the following warning:
    
    /home/drwells/Documents/Code/CPP/dealii-dev/source/base/mpi.cc: In static member function 'static constexpr void dealii::Utilities::MPI::create_mpi_data_type_n_bytes(std::size_t)::<lambda(ompi_datatype_t**)>::_FUN(ompi_datatype_t**)':
    /home/drwells/Documents/Code/CPP/dealii-dev/source/base/mpi.cc:384:15: warning: 'this' pointer is null [-Wnonnull]
      384 |               }};
          |               ^
    /home/drwells/Documents/Code/CPP/dealii-dev/source/base/mpi.cc:376:15: note: in a call to non-static member function 'dealii::Utilities::MPI::create_mpi_data_type_n_bytes(std::size_t)::<lambda(ompi_datatype_t**)>'
      376 |               [](MPI_Datatype *p) {
          |               ^
    
    This isn't a problem since deleters don't store any kind of state but we can
    work around it by splitting the constructor call.
    drwells committed Jan 24, 2022
    Configuration menu
    Copy the full SHA
    2418d18 View commit details
    Browse the repository at this point in the history