From feced5910c6c33678798d808127ad6738edf9f19 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 12 Jun 2019 18:15:57 -0700 Subject: [PATCH] configure: Fix FD_ISSET test under -Werror MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The uninitialized variable warning from T x; broke the test if the user passed CXXFLAGS='-O2 -Wall -Werror'. (Users shouldn’t do that; our own --enable-compile-warnings=error option was unaffected.) Signed-off-by: Anders Kaseorg --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 78d3a29..fa5fb73 100644 --- a/configure.ac +++ b/configure.ac @@ -384,7 +384,7 @@ class T { public: fd_set fds; bool Fun( void ) const { return FD_ISSET( 0, &fds ); } };]], -[[T x; return x.Fun();]])], +[[T x = T(); return x.Fun();]])], [AC_DEFINE([FD_ISSET_IS_CONST], [1], [Define if FD_ISSET() fd_set argument is const.]) AC_MSG_RESULT([yes])],