Fix gcc 9 "warning: ‘unused’ attribute ignored"
[alexxy/gromacs.git] / src / gromacs / mdtypes / forcebuffers.h
index ed14bf9d357342e8fd41c4f520ba18e9424a45b1..fe7c8d5899ed95447e8dfc6db482ed225e39751e 100644 (file)
@@ -124,8 +124,13 @@ private:
     ArrayRefWithPadding<RVec> force_;
     //! The force buffer for combined fast and slow forces with MTS
     ArrayRefWithPadding<RVec> forceMtsCombined_;
+    // GCC 9 complains about unused attribute "unused" as it never warns about unused members,
+    // while clang requires it to avoid -Wunused
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wattributes"
     //! Wether we use forceMtsCombined_
     gmx_used_in_debug bool useForceMtsCombined_;
+#pragma GCC diagnostic pop
 };
 
 /*! \libinternal \brief Object that holds the force buffers