configure: Fix FD_ISSET test under -Werror

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 <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2019-06-12 18:15:57 -07:00
parent 7c10080766
commit feced5910c
+1 -1
View File
@@ -384,7 +384,7 @@ class T {
public: public:
fd_set fds; fd_set fds;
bool Fun( void ) const { return FD_ISSET( 0, &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], [AC_DEFINE([FD_ISSET_IS_CONST], [1],
[Define if FD_ISSET() fd_set argument is const.]) [Define if FD_ISSET() fd_set argument is const.])
AC_MSG_RESULT([yes])], AC_MSG_RESULT([yes])],