[PATCH:libFS 5/7] Remove unused internal helper _FSWireToEvent

Alan Coopersmith alan.coopersmith at oracle.com
Tue Jan 7 16:02:25 PST 2014


Since we build with -export-symbols-regex '^FS.*', it wasn't available
to callers outside libFS, and was never called by anything inside libFS.

Seems to have been imported from XlibInt.c without ever being used.

Flagged by cppcheck 1.62:
[FSlibInt.c:753]: (style) The function '_FSWireToEvent' is never used.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 src/FSlibInt.c |   29 -----------------------------
 src/FSlibint.h |    1 -
 2 files changed, 30 deletions(-)

diff --git a/src/FSlibInt.c b/src/FSlibInt.c
index eeab20c..71f6ac1 100644
--- a/src/FSlibInt.c
+++ b/src/FSlibInt.c
@@ -746,35 +746,6 @@ _FSUnknownNativeEvent(
     return (0);
 }
 
-/*
- * reformat a wire event into an FSEvent structure of the right type.
- */
-Bool
-_FSWireToEvent(
-    register FSServer	*svr,	/* pointer to display structure */
-    register FSEvent	*re,	/* pointer to where event should be
-				 * reformatted */
-    register fsEvent	*event)	/* wire protocol event */
-{
-
-    re->type = event->type & 0x7f;
-    ((FSAnyEvent *) re)->serial = _FSSetLastRequestRead(svr,
-						   (fsGenericReply *) event);
-    ((FSAnyEvent *) re)->send_event = ((event->type & 0x80) != 0);
-    ((FSAnyEvent *) re)->server = svr;
-
-    /*
-     * Ignore the leading bit of the event type since it is set when a client
-     * sends an event rather than the server.
-     */
-
-    switch (event->type & 0177) {
-    default:
-	return (_FSUnknownWireEvent(svr, re, event));
-    }
-}
-
-
 static const char *
 _SysErrorMsg(int n)
 {
diff --git a/src/FSlibint.h b/src/FSlibint.h
index b5aba87..5e539be 100644
--- a/src/FSlibint.h
+++ b/src/FSlibint.h
@@ -87,7 +87,6 @@ extern unsigned long _FSSetLastRequestRead ( FSServer *svr,
 extern int _FSUnknownWireEvent ( FSServer *svr, FSEvent *re, fsEvent *event );
 extern int _FSUnknownNativeEvent ( FSServer *svr, FSEvent *re,
 				   fsEvent *event );
-extern int _FSWireToEvent ( FSServer *svr, FSEvent *re, fsEvent *event );
 extern int _FSDefaultIOError ( FSServer *svr ) _X_NORETURN;
 extern int _FSPrintDefaultError ( FSServer *svr, FSErrorEvent *event,
 				  FILE *fp );
-- 
1.7.9.2



More information about the xorg-devel mailing list