Patch to fix some build errors/warnings

Stefan Dirsch sndirsch at suse.de
Tue Jun 14 06:22:21 PDT 2005


Hi

Attached you find a patch, which fixes some build errors and warnings,
which are fatal errors in a SUSE build environment.


Description:
------------

lib/X11/src/imTrans.c
* imTrans.c:67: warning: implicit declaration of function '_XimXTransOpenCOTSClient'
* imTrans.c:67: warning: nested extern declaration of '_XimXTransOpenCOTSClient'
* imTrans.c:68: warning: assignment makes pointer from integer without a cast
lib/X11/src/ConnDis.c
* ConnDis.c:363: warning: implicit declaration of function '_X11TransOpenCOTSClient'
* ConnDis.c:363: warning: nested extern declaration of '_X11TransOpenCOTSClient'
* ConnDis.c:363: warning: assignment makes pointer from integer without a cast
lib/FS/src/FSConnServ.c
* FSConnServ.c:95: warning: implicit declaration of function '_FSTransOpenCOTSClient'
* FSConnServ.c:95: warning: assignment makes pointer from integer without a cast
lib/ICE/src/connect.c
* connect.c:499: warning: implicit declaration of function '_IceTransOpenCOTSClient'
* connect.c:499: warning: nested extern declaration of '_IceTransOpenCOTSClient'
* connect.c:499: warning: assignment makes pointer from integer without a cast
lib/ICE/src/accept.c
* accept.c:54: warning: implicit declaration of function '_IceTransAccept'
* accept.c:54: warning: nested extern declaration of '_IceTransAccept'
* accept.c:54: warning: assignment makes pointer from integer without a cast
lib/Xt/src/TMaction.c
* TMaction.c: In function '_XtBindActions':
* TMaction.c:446: warning: 'bcStatusRec.refCount' is used uninitialized in this function
lib/Xp/src/XpExtUtil.c
* XpExtUtil.c:143: error: 'caddr_t' undeclared (first use in this function)
lib/Xfont/src/builtins/render.c
* render.c:108: warning: control reaches end of non-void function
Xfont/src/builtins/fpe.c
* fpe.c:93: warning: control reaches end of non-void function
lib/XRes/configure.ac:
* XRes.c:17:33: error: X11/extensions/XRes.h: No such file or directory

Hopefully this patch or at least parts of this patch could be included
in CVS for the future after discussing it. It's against X.Org / X.Org
modular CVS of today.

Best regards, 
Stefan

Public Key available
------------------------------------------------------
Stefan Dirsch (Res. & Dev.)   SUSE LINUX Products GmbH
Tel: 0911-740 53 0            Maxfeldstraße 5
FAX: 0911-740 53 479          D-90409 Nürnberg
http://www.suse.de            Germany 
------------------------------------------------------
-------------- next part --------------
--- lib/X11/src/imTrans.c.orig	2005-05-30 17:34:34.000000000 +0000
+++ lib/X11/src/imTrans.c	2005-05-30 17:43:05.000000000 +0000
@@ -64,7 +64,7 @@
 
     for (retry = XIM_CONNECTION_RETRIES; retry >= 0; retry--)
     {
-	if ((spec->trans_conn = _XimXTransOpenCOTSClient (
+	if ((spec->trans_conn = (struct _XtransConnInfo*) _XimXTransOpenCOTSClient (
 	    spec->address)) == NULL)
 	{
 	    break;
--- lib/X11/src/ConnDis.c.orig	2005-05-30 17:43:47.000000000 +0000
+++ lib/X11/src/ConnDis.c	2005-05-30 17:44:17.000000000 +0000
@@ -360,7 +360,7 @@
      */
     for(retry=X_CONNECTION_RETRIES; retry>=0; retry-- )
 	{
-	if ( (trans_conn = _X11TransOpenCOTSClient(address)) == NULL )
+	if ( (trans_conn = (struct _XtransConnInfo *) _X11TransOpenCOTSClient(address)) == NULL )
 	    {
 	    break;
 	    }
--- lib/FS/src/FSConnServ.c.orig	2005-05-31 13:52:53.000000000 +0000
+++ lib/FS/src/FSConnServ.c	2005-05-31 13:54:46.000000000 +0000
@@ -92,7 +92,7 @@
 
     for (retry = FS_CONNECTION_RETRIES; retry >= 0; retry--)
     {
-	if ((trans_conn = _FSTransOpenCOTSClient(server_name)) == NULL)
+	if ((trans_conn = (XtransConnInfo) _FSTransOpenCOTSClient(server_name)) == NULL)
 	{
 	    break;
 	}
--- lib/ICE/src/connect.c.orig	2005-05-31 13:59:22.000000000 +0000
+++ lib/ICE/src/connect.c	2005-05-31 13:57:45.000000000 +0000
@@ -496,7 +496,7 @@
 
 	for (retry = ICE_CONNECTION_RETRIES; retry >= 0; retry--)
 	{
-	    if ((trans_conn = _IceTransOpenCOTSClient (address)) == NULL)
+	    if ((trans_conn = (XtransConnInfo) _IceTransOpenCOTSClient (address)) == NULL)
 	    {
 		break;
 	    }
--- lib/ICE/src/accept.c.orig	2005-05-31 13:48:31.000000000 +0000
+++ lib/ICE/src/accept.c	2005-05-31 13:51:20.000000000 +0000
@@ -51,7 +51,7 @@
      * Accept the connection.
      */
 
-    if ((newconn = _IceTransAccept (listenObj->trans_conn, &status)) == 0)
+    if ((newconn = (XtransConnInfo) _IceTransAccept (listenObj->trans_conn, &status)) == 0)
     {
 	if (status == TRANS_ACCEPT_BAD_MALLOC)
 	    *statusRet = IceAcceptBadMalloc;
--- lib/Xt/src/TMaction.c.orig  2005-05-31 13:48:31.000000000 +0000
+++ lib/Xt/src/TMaction.c       2005-05-31 13:51:20.000000000 +0000
@@ -647,6 +647,9 @@
 					 procs,
 					 &bcStatusRec);
 
+                /* uninitialized */
+                bcStatusRec.refCount = 0;
+
 		if (localUnbound)
 		  bcStatusRec.notFullyBound = True;
 		else
--- lib/Xp/src/XpExtUtil.c.orig	2005-06-02 07:54:26.000000000 +0000
+++ lib/Xp/src/XpExtUtil.c	2005-06-02 07:54:56.000000000 +0000
@@ -140,7 +140,7 @@
 	 * Hang a Xp private data struct.   Use it for version
 	 * information.
 	 */
-	info->data = (caddr_t) Xmalloc (sizeof (xpPrintData));
+	info->data = (char *) Xmalloc (sizeof (xpPrintData));
 	if (!info->data) {
 	    return (-1);
 	}
--- lib/Xfont/src/builtins/render.c.orig	2005-06-02 13:02:38.000000000 +0000
+++ lib/Xfont/src/builtins/render.c	2005-06-02 13:03:41.000000000 +0000
@@ -105,5 +105,6 @@
     int	i;
     for (i = 0; i < numRenderers; i++)
 	FontFileRegisterRenderer ((FontRendererRec *) &renderers[i]);
+    return 0;
 }
 
--- lib/Xfont/src/builtins/fpe.c.orig	2005-06-02 13:04:10.000000000 +0000
+++ lib/Xfont/src/builtins/fpe.c	2005-06-02 13:04:46.000000000 +0000
@@ -90,4 +90,5 @@
 					  (StartLaFunc) 0,
 					  (NextLaFunc) 0,
 					  (SetPathFunc) 0);
+    return 0;
 }
--- /usr/local/src/xorg/xorg-modular/lib/XRes/configure.ac	2005-06-07 20:51:22.000000000 +0200
+++ lib/XRes/configure.ac	2005-06-08 10:53:06.000000000 +0200
@@ -56,7 +56,7 @@
 	GCC_WARNINGS="-Wall -Wpointer-arith -Wstrict-prototypes \
 	-Wmissing-prototypes -Wmissing-declarations \
 	-Wnested-externs -fno-strict-aliasing"
-	CFLAGS="$GCC_WARNINGS $CFLAGS"
+	CFLAGS="$GCC_WARNINGS $CFLAGS -I`pwd`/include"
 fi
 
 AC_OUTPUT([Makefile


More information about the xorg-modular mailing list