Fix misc-misplaced-const clang-tidy warning
authorAndrey Alekseenko <al42and@gmail.com>
Thu, 9 Sep 2021 14:46:43 +0000 (17:46 +0300)
committerAndrey Alekseenko <al42and@gmail.com>
Fri, 10 Sep 2021 07:16:46 +0000 (07:16 +0000)
The problem was introduced in 4a4ade89 (MR !1903).

As MPI_Comm is typedef'd as a pointer to a structure, declaring it const
would be of little use: the pointer itself would be const, not the data
it is pointing to.

src/gromacs/fft/tests/fft.cpp

index ce3717e210ffdf72c29f90dd90ac50613801e087..c421abcb4bd33588dcd708b368b42398b9a7693c 100644 (file)
@@ -406,7 +406,7 @@ TEST_F(FFTTest3D, GpuReal5_6_9)
         const FftBackend backend = FftBackend::Ocl;
 #    endif
         const bool         performOutOfPlaceFFT    = true;
-        const MPI_Comm     comm                    = MPI_COMM_NULL;
+        MPI_Comm           comm                    = MPI_COMM_NULL;
         const bool         allocateGrid            = false;
         std::array<int, 1> gridSizesInXForEachRank = { 0 };
         std::array<int, 1> gridSizesInYForEachRank = { 0 };