Fix compiler warnings introduced in 8f6ea9eb6c (!1865)
authorAndrey Alekseenko <al42and@gmail.com>
Wed, 18 Aug 2021 09:42:11 +0000 (12:42 +0300)
committerAndrey Alekseenko <al42and@gmail.com>
Wed, 18 Aug 2021 09:42:11 +0000 (12:42 +0300)
- Add ifdef around clang-specific pragmas.
- Add newline at the end of file.

src/gromacs/gpu_utils/device_event.cuh
src/gromacs/gpu_utils/device_event.h

index e2fe4c577a8f47373714e1bb1b7974f376788295..41029d7e80986e91488d4724f380b36105d0ff88 100644 (file)
@@ -115,4 +115,4 @@ private:
 
 #endif
 
-#endif
\ No newline at end of file
+#endif
index 9d479049f3ce8d1c13521f7831a6206eb3d7d6c4..2d52a2cabafddce8192a80b75591028c472cc3e3 100644 (file)
@@ -56,8 +56,10 @@ class DeviceStream;
 // [[noreturn]] attributes must be added to the methods, so it's
 // easier to silence the warning here and avoid them appearing in
 // the Doxygen
-#    pragma clang diagnostic push
-#    pragma clang diagnostic ignored "-Wmissing-noreturn"
+#    ifdef __clang__
+#        pragma clang diagnostic push
+#        pragma clang diagnostic ignored "-Wmissing-noreturn"
+#    endif
 
 class DeviceEvent
 {
@@ -106,7 +108,9 @@ public:
     }
 };
 
-#    pragma clang diagnostic pop
+#    ifdef __clang__
+#        pragma clang diagnostic pop
+#    endif
 
 #elif GMX_GPU_CUDA
 #    include "device_event.cuh"