summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-01-03 20:55:33 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-01-08 17:46:35 -0800
commitb9f27dc863c3ca01bb231ee48e84bc60b39d4f1f (patch)
tree83cf157042d9d6ecef901924573fed817e23a76a
parent37772516acb95b3c9934252994b7dfdc147dfd23 (diff)
Remove unused internal helper _FSEventsQueued
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@oracle.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
-rw-r--r--src/FSlibInt.c36
-rw-r--r--src/FSlibint.h1
2 files changed, 0 insertions, 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 );