mirror of
				https://github.com/SwallowOS/xorg_lib_libxtrans
				synced 2025-11-04 05:46:13 +08:00 
			
		
		
		
	SocketOpenCOTSServer: handle -Wconditional-uninitialized warning
Clears warning from clang 13:
.../include/X11/Xtrans/Xtranssock.c:670:14: warning: variable 'ciptr'
 may be uninitialized when used here [-Wconditional-uninitialized]
        setsockopt (ciptr->fd, SOL_SOCKET, SO_REUSEADDR,
                    ^~~~~
.../include/X11/Xtrans/Xtranssock.c:624:25: note: initialize the
 variable 'ciptr' to silence this warning
    XtransConnInfo      ciptr;
                             ^
                              = NULL
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/26>
			
			
This commit is contained in:
		@@ -621,7 +621,7 @@ TRANS(SocketOpenCOTSServer) (Xtransport *thistrans, const char *protocol,
 | 
			
		||||
			     const char *host, const char *port)
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
    XtransConnInfo	ciptr;
 | 
			
		||||
    XtransConnInfo	ciptr = NULL;
 | 
			
		||||
    int	i = -1;
 | 
			
		||||
 | 
			
		||||
    prmsg (2,"SocketOpenCOTSServer(%s,%s,%s)\n", protocol, host, port);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user