[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#297825: twin: FTBFS (amd64/gcc-4.0): static declaration of 'DeleteAllListeners' follows non-static declaration

Package: twin
Severity: normal
Tags: patch

When building 'twin' on amd64 with gcc-4.0,
I get the following error:

libTw_u.c: At top level:
libTw_u.c:1595: warning: conflicting types for 'DeleteAllListeners'
libTw_u.c:1595: error: static declaration of 'DeleteAllListeners' follows non-static declaration
libTw_u.c:1224: error: previous implicit declaration of 'DeleteAllListeners' was here
make[3]: *** [libTw_u.o] Error 1
make[3]: Leaving directory `/twin-0.4.0/libs/libTw'

With the attached patch 'twin' can be compiled
on amd64 using gcc-4.0.

Andreas Jochens

diff -urN ../tmp-orig/twin-0.4.0/libs/libTw/libTw.c ./libs/libTw/libTw.c
--- ../tmp-orig/twin-0.4.0/libs/libTw/libTw.c	2001-11-21 20:57:37.000000000 +0100
+++ ./libs/libTw/libTw.c	2005-03-02 18:28:06.000000000 +0100
@@ -1182,6 +1182,8 @@
     return (tw_d)0;
+static void DeleteAllListeners(tlistener);
 /* just like all Tw_* functions, this requires LOCK not to be held */
  * Tw_Close() is not completely thread-safe, but it would be useless anyway
@@ -1193,7 +1195,6 @@
  * closes a server connection
 void Tw_Close(tw_d TwD) {
-    static void DeleteAllListeners(tlistener);
     s_tw_errno *E;
     byte *q;
     int i;
diff -urN ../tmp-orig/twin-0.4.0/server/HW/hw_tty.c ./server/HW/hw_tty.c
--- ../tmp-orig/twin-0.4.0/server/HW/hw_tty.c	2001-09-29 00:23:32.000000000 +0200
+++ ./server/HW/hw_tty.c	2005-03-03 09:20:54.450055645 +0100
@@ -366,9 +366,9 @@
 static byte xterm_MouseData[10] = "\033[M#!!!!";
+static void xterm_MouseEvent(int, display_hw);
 static void stdin_KeyboardEvent(int fd, display_hw hw) {
-    static void xterm_MouseEvent(int, display_hw);
     static byte *match;
     byte got, chunk, buf[SMALLBUFF], *s;
     udat Code, ShiftFlags;

Reply to: