[PATCH:libFS 4/7] Remove unused internal helper _FSEventsQueued
Alan Coopersmith
alan.coopersmith at oracle.com
Tue Jan 7 16:02:24 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:180]: (style) The function '_FSEventsQueued' is never used.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
src/FSlibInt.c | 36 ------------------------------------
src/FSlibint.h | 1 -
2 files changed, 37 deletions(-)
diff --git a/src/FSlibInt.c b/src/FSlibInt.c
index 48091cf..eeab20c 100644
--- a/src/FSlibInt.c
+++ b/src/FSlibInt.c
@@ -176,42 +176,6 @@ _FSFlush(register FSServer *svr)
svr->last_req = (char *) &_dummy_request;
}
-int
-_FSEventsQueued(
- register FSServer *svr,
- int mode)
-{
- register BytesReadable_t len;
- BytesReadable_t pend;
- char buf[BUFSIZE];
- register fsReply *rep;
-
- if (mode == QueuedAfterFlush) {
- _FSFlush(svr);
- if (svr->qlen)
- return (svr->qlen);
- }
- if (_FSTransBytesReadable(svr->trans_conn, &pend) < 0)
- (*_FSIOErrorFunction) (svr);
- if ((len = pend) < SIZEOF(fsReply))
- return (svr->qlen); /* _FSFlush can enqueue events */
- else if (len > BUFSIZE)
- len = BUFSIZE;
- len /= SIZEOF(fsReply);
- pend = len * SIZEOF(fsReply);
- _FSRead(svr, buf, (long) pend);
-
- /* no space between comma and type or else macro will die */
- STARTITERATE(rep, fsReply, buf, (len > 0), len--) {
- if (rep->generic.type == FS_Error)
- _FSError(svr, (fsError *) rep);
- else /* must be an event packet */
- _FSEnq(svr, (fsEvent *) rep);
- }
- ENDITERATE
- return (svr->qlen);
-}
-
/* _FSReadEvents - Flush the output queue,
* then read as many events as possible (but at least 1) and enqueue them
*/
diff --git a/src/FSlibint.h b/src/FSlibint.h
index b50509b..b5aba87 100644
--- a/src/FSlibint.h
+++ b/src/FSlibint.h
@@ -82,7 +82,6 @@ extern int _FSReply ( FSServer *svr, fsReply *rep, int extra, int discard );
extern XtransConnInfo _FSConnectServer ( char *server_name );
extern void _FSDisconnectServer ( XtransConnInfo trans_conn );
extern void _FSSendClientPrefix ( FSServer *svr, fsConnClientPrefix *client );
-extern int _FSEventsQueued ( FSServer *svr, int mode );
extern unsigned long _FSSetLastRequestRead ( FSServer *svr,
fsGenericReply *rep );
extern int _FSUnknownWireEvent ( FSServer *svr, FSEvent *re, fsEvent *event );
--
1.7.9.2
More information about the xorg-devel
mailing list