From 2c59fbe30b86854f32e80b84be18328a661e7707 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sun, 16 Oct 2016 02:15:13 +0200 Subject: Fix warnings in XlibInt.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XlibInt.c: In function ‘_XIOError’: XlibInt.c:3750:1: warning: ‘noreturn’ function does return [enabled by default] } After fixing the above a new warning came up, which is also fixed now: XlibInt.c: In function ‘_XIOError’: XlibInt.c:3750:1: warning: control reaches end of non-void function [-Wreturn-type] } --- nx-X11/lib/X11/XlibInt.c | 2 ++ nx-X11/lib/X11/Xlibint.h | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'nx-X11/lib') diff --git a/nx-X11/lib/X11/XlibInt.c b/nx-X11/lib/X11/XlibInt.c index d3c85a343..851fa236e 100644 --- a/nx-X11/lib/X11/XlibInt.c +++ b/nx-X11/lib/X11/XlibInt.c @@ -3743,6 +3743,8 @@ _XIOError ( dpy->flags &= ~XlibDisplayReadEvents; dpy->flags &= ~XlibDisplayWriting; dpy->flags &= ~XlibDisplayReply; + /* shut up the compiler by returning something */ + return 0; #else exit (1); #endif diff --git a/nx-X11/lib/X11/Xlibint.h b/nx-X11/lib/X11/Xlibint.h index 056b4d8f9..932ed745e 100644 --- a/nx-X11/lib/X11/Xlibint.h +++ b/nx-X11/lib/X11/Xlibint.h @@ -856,7 +856,12 @@ extern int _XError( ); extern int _XIOError( Display* /* dpy */ +#ifdef NX_TRANS_SOCKET +); +#else ) _X_NORETURN; +#endif /* NX_TRANS_SOCKET */ + extern int (*_XIOErrorFunction)( Display* /* dpy */ ); -- cgit v1.2.3