[PATCH] fix TLS error flagged by gcc-5.2.1

Jeff Sparkes <[email protected]> Fri, 27 Nov 2015 10:01:16 -0500
Newsgroups gmane.emacs.xemacs.patches
Message-ID <[email protected]>
I required this fix to compile with --with-tls=no on Ubuntu 15.10.
Gcc 5.2.1 is a bit stricter about casts.


src/ChangeLog addition:

2015-11-27  Jeff Sparkes  <[email protected]>

	* tls.h (tls_open): Fix error flagged by stricter gcc-5.2.1.


xemacs source patch:
Diff command:   hg diff --git 
Files affected: src/tls.h

diff --git a/src/tls.h b/src/tls.h
--- a/src/tls.h
+++ b/src/tls.h
@@ -82,14 +82,14 @@
 #define TLS_SETUP_SOCK 1
 #define tls_open(x,y) ({						\
       signal_error (Qtls_error, "TLS support unavailable", Qnil);	\
-      NULL; })
-#define tls_negotiate(x,y,z) NULL
+      (int *)NULL; })
+#define tls_negotiate(x,y,z) (int *)NULL
 #define make_tls_input_stream(x) ({					\
       signal_error (Qtls_error, "TLS support unavailable", Qnil);	\
-      NULL; })
+      (int *)NULL; })
 #define make_tls_output_stream(x) ({					\
       signal_error (Qtls_error, "TLS support unavailable", Qnil);	\
-      NULL; })
+      (int *)NULL; })
 #define tls_get_fd(x)		-1
 #define tls_read(w,x,y,z)	-1
 #define tls_write(w,x,y,z)	-1