Reported by Bernhard Voelker <mail@bernhard-voelker.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00090.html>.
* tests/test-getgroups.c: Silence gcc warnings of type
-Wstringop-overflow.
+2021-01-02 Bruno Haible <bruno@clisp.org>
+
+ getgroups test: Avoid warning with glibc >= 2.32 and gcc >= 10.
+ Reported by Bernhard Voelker <mail@bernhard-voelker.de> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00090.html>.
+ * tests/test-getgroups.c: Silence gcc warnings of type
+ -Wstringop-overflow.
+
2021-01-02 Bruno Haible <bruno@clisp.org>
timespec_get: Add tests.
#include "macros.h"
+/* Tell GCC not to warn about the specific edge cases tested here.
+ GCC >= 10 with glibc >= 2.32 would otherwise trigger warnings, even without
+ any -W options, because getgroups() is declared with
+ __attribute__ ((__access__ (__write_only__, 2, 1)))
+ */
+#if __GNUC__ >= 7
+# pragma GCC diagnostic ignored "-Wstringop-overflow"
+#endif
+
int
main (int argc, char **argv _GL_UNUSED)
{