fix some more warnings

git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4746 77e5149b-7576-45b1-b177-96237e5ba77b
0.95
Török Edvin 17 years ago
parent 10ab5e32f4
commit 0115f12ffc
  1. 5
      ChangeLog
  2. 2
      clamd/scanner.c
  3. 3
      clamd/server-th.c
  4. 1
      clamd/session.c
  5. 10
      clamd/thrmgr.c
  6. 2
      clamdscan/proto.c

@ -1,3 +1,8 @@
Thu Feb 12 12:35:19 EET 2009 (edwin)
------------------------------------
* clamd/scanner.c, clamd/server-th.c, clamd/session.c,
clamd/thrmgr.c, clamdscan/proto.c: fix some more warnings
Thu Feb 12 12:25:25 EET 2009 (edwin)
------------------------------------
* clamd/scanner.c, clamd/server-th.c, clamd/session.c,

@ -273,7 +273,7 @@ int scanstream(int odesc, unsigned long int *scanned, const struct cl_engine *en
int tmpd, bread, retval, timeout, btread;
unsigned int port = 0, portscan, min_port, max_port;
unsigned long int quota = 0, maxsize = 0;
short bound = 0, rnd_port_first = 1;
short bound = 0;
const char *virname;
char buff[FILEBUFF];
char peer_addr[32];

@ -812,7 +812,7 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
while (!error && buf->fd != -1 && buf->buffer && pos < buf->off &&
buf->mode != MODE_WAITANCILL) {
client_conn_t conn;
const unsigned char *cmd;
const unsigned char *cmd = NULL;
size_t cmdlen = 0;
char term = '\n';
int rc;
@ -835,7 +835,6 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
while ((conn.mode == MODE_COMMAND) &&
(cmd = get_cmd(buf, pos, &cmdlen, &term)) != NULL) {
const char *argument;
int has_more = (buf->buffer + buf->off) > (cmd + cmdlen);
enum commands cmdtype = parse_command(cmd, &argument);
logg("*RECVTH: got command %s (%u, %u), argument: %s\n",
cmd, (unsigned)cmdlen, (unsigned)cmdtype, argument ? argument : "");

@ -174,7 +174,6 @@ int command(client_conn_t *conn, int *virus)
struct cl_engine *engine = conn->engine;
unsigned int options = conn->options;
const struct optstruct *opts = conn->opts;
const char term = conn->term;
int type = -1; /* TODO: make this enum */
int maxdirrec;
int ret = 0;

@ -158,7 +158,7 @@ static void remove_frompools(threadpool_t *t)
static void print_queue(int f, work_queue_t *queue, struct timeval *tv_now)
{
long umin=~0UL, umax=0, usum=0;
int invalids = 0, cnt = 0;
unsigned invalids = 0, cnt = 0;
work_item_t *q;
if(!queue->head)
@ -475,7 +475,7 @@ static void stats_tls_key_alloc(void)
static const char *IDLE_TASK = "IDLE";
/* no mutex is needed, we are using thread local variable */
void thrmgr_setactivetask(const char *filename, const char* command)
void thrmgr_setactivetask(const char *filename, const char* cmd)
{
struct task_desc *desc;
pthread_once(&stats_tls_key_once, stats_tls_key_alloc);
@ -483,10 +483,10 @@ void thrmgr_setactivetask(const char *filename, const char* command)
if(!desc)
return;
desc->filename = filename;
if(command) {
if(command == IDLE_TASK && desc->command == command)
if(cmd) {
if(cmd == IDLE_TASK && desc->command == cmd)
return;
desc->command = command;
desc->command = cmd;
gettimeofday(&desc->tv, NULL);
}
}

@ -405,7 +405,7 @@ struct client_parallel_data {
/* Sends a proper scan request to clamd and parses its replies
* This is used only in IDSESSION mode
* Returns 0 on success, 1 on hard failures */
int dspresult(struct client_parallel_data *c) {
static int dspresult(struct client_parallel_data *c) {
const char *filename;
char *bol, *eol;
unsigned int rid;

Loading…
Cancel
Save