Subject: [5ef95e85] fails to build with --enable-gcc-warnings in some configurations

From: Ivan Shmakov <[email-masked]>
Date: Fri, 29 Nov 2013 17:02:24 +0000

As of 5ef95e85, building with GCC 4.8.2, --enable-gcc-warnings,
	--without-x-toolkit, and GnuTLS 2, fails with:

../../src/xfaces.c:914:0: error: macro "NEAR_SAME_COLOR_THRESHOLD" is not used [-Werror=unused-macros]
 #define NEAR_SAME_COLOR_THRESHOLD 30000
 ^
cc1: all warnings being treated as errors

../../src/gnutls.c:266:1: error: 'gnutls_audit_log_function' defined but not used [-Werror=unused-function]
 gnutls_audit_log_function (gnutls_session_t session, const char* string)
 ^
cc1: all warnings being treated as errors

	The causes are:

	• the NEAR_SAME_COLOR_THRESHOLD macro’s definition is not
	  properly guarded with #ifdef HAVE_WINDOW_SYSTEM;

	• both the declaration and the definition of
	  gnutls_audit_log_function () are not properly guarded with
	  #ifdef HAVE_GNUTLS3.

	Adding the respective guards fixes both of the GCC errors.

	The issue seem not to be fixed in e7203144, either.

-- 
FSF associate member #7257