summaryrefslogtreecommitdiff
path: root/tests/test-perror2.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-perror2.c')
-rw-r--r--tests/test-perror2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test-perror2.c b/tests/test-perror2.c
index de12480322..0c96832d37 100644
--- a/tests/test-perror2.c
+++ b/tests/test-perror2.c
@@ -22,6 +22,11 @@
#include <string.h>
#include <unistd.h>
+/* Tell GCC not to warn about myerr being leaked. */
+#if __GNUC__ >= 10
+# pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
+#endif
+
/* This test intentionally parses stderr. So, we arrange to have fd 10
(outside the range of interesting fd's during the test) set up to
duplicate the original stderr. */