[PATCH] Fix "XXX declared 'static' but not defined"
Tomas Carnecky
tom at dbservice.com
Wed Feb 4 06:26:18 PST 2009
The functions are declared static in Xtransint.h but are defined
in Xtransutil.c. So when someone (xserver/os/connection.c)
incuded Xtransint.h, gcc would throw the warning.
I removed the declarations from the header and rearranged includes
in transport.c so that Xtransutil.c is included just after
Xtransint.h. This way the functions are still defined for the
files that need them (Xtranssock.c, Xtranstli.c).
Signed-off-by: Tomas Carnecky <tom at dbservice.com>
---
Xtransint.h | 12 ------------
transport.c | 2 +-
2 files changed, 1 insertions(+), 13 deletions(-)
diff --git a/Xtransint.h b/Xtransint.h
index 623cdef..e1a95a2 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -345,18 +345,6 @@ static int TRANS(WriteV)(
#endif /* CRAY || WIN32 || __sxg__ */
-
-static int is_numeric (
- char * /* str */
-);
-
-#ifdef TRANS_SERVER
-static int trans_mkdir (
- char *, /* path */
- int /* mode */
-);
-#endif
-
/*
* Some XTRANSDEBUG stuff
*/
diff --git a/transport.c b/transport.c
index 5131d99..baf5bfd 100644
--- a/transport.c
+++ b/transport.c
@@ -59,6 +59,7 @@ from The Open Group.
#endif
#include "Xtransint.h"
+#include "Xtransutil.c"
#ifdef LOCALCONN
#include "Xtranslcl.c"
@@ -70,4 +71,3 @@ from The Open Group.
#include "Xtranstli.c"
#endif
#include "Xtrans.c"
-#include "Xtransutil.c"
--
1.6.1.2
More information about the xorg
mailing list