From b9f27dc863c3ca01bb231ee48e84bc60b39d4f1f Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 3 Jan 2014 20:55:33 -0800 Subject: 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 Reviewed-by: Jasper St. Pierre --- 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 ); -- cgit v1.2.3