[PATCH:xts 04/16] xts5: Fix implicit declaration.

Cyril Brulebois kibi at debian.org
Wed May 25 04:00:13 PDT 2011


Use a forward declaration to avoid moving the function body across the
file.

The following warning goes away accordingly:
|   CC     checkevent.lo
| checkevent.c:647:10: warning: implicit declaration of function 'check_ext_event' is invalid in C99 [-Wimplicit-function-declaration]
|                 fail = check_ext_event(good,ev);
|                        ^

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 xts5/src/lib/checkevent.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/xts5/src/lib/checkevent.c b/xts5/src/lib/checkevent.c
index 40a0e60..753464d 100644
--- a/xts5/src/lib/checkevent.c
+++ b/xts5/src/lib/checkevent.c
@@ -240,6 +240,11 @@ SOFTWARE.
 	fail++; \
 	} else pass++;
 
+/* Forward declaration to avoid moving the all function up */
+#ifdef INPUTEXTENSION
+int check_ext_event(XEvent*, XEvent*);
+#endif
+
 /*
  * Compare two events.
  * Returns the number of fields that compared false.
-- 
1.7.5.1



More information about the xorg-devel mailing list