From 88870313244241f33c460559a7f57a1c116eef1f Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Tue, 13 Oct 2026 16:12:03 +0300 Subject: [PATCH] Remove fields and declarations nothing uses conf.haveerror was only initialised and srvparam.srvfds only declared; the extern declarations of stdlog and demon named globals that do not exist (both are fields of conf); a local in make_ace() and one in the webadmin XML page were never used. Co-Authored-By: Claude Opus 5.5 --- src/common.c | 1 - src/conf.c | 1 - src/proxy.h | 2 -- src/structures.h | 3 +-- src/webadmin.c | 2 -- 5 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/common.c b/src/common.c index 6241f8f..a103ba4 100644 --- a/src/common.c +++ b/src/common.c @@ -247,7 +247,6 @@ struct extparam conf = { .poolmax = -1, .pooltimeout = 60, .counterd = -1, - .haveerror = 0, .rotate = 0, .paused = 0, .archiverc = 0, diff --git a/src/conf.c b/src/conf.c index c0530ef..ddcd88a 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1337,7 +1337,6 @@ struct ace * make_ace (int argc, unsigned char ** argv){ arg = (unsigned char *)strtok((char *)argv[2], ","); if(arg) do { int arglen; - unsigned char *pattern; struct iplist tmpip={NULL}; arglen = (int)strlen((char *)arg); diff --git a/src/proxy.h b/src/proxy.h index ad2d4c6..47d0925 100644 --- a/src/proxy.h +++ b/src/proxy.h @@ -275,7 +275,6 @@ int hascap(const unsigned char *line, const char *cap); void dolog(struct clientparam * param, const unsigned char *s); int dobuf(struct clientparam * param, unsigned char * buf, const unsigned char *s, const unsigned char * doublec); int dobuf2(struct clientparam * param, unsigned char * buf, const unsigned char *s, const unsigned char * doublec, struct tm* tm, char * format); -extern FILE * stdlog; void logstdout(struct clientparam * param, const unsigned char *s); void logsyslog(struct clientparam * param, const unsigned char *s); void lognone(struct clientparam * param, const unsigned char *s); @@ -316,7 +315,6 @@ int socks5_udp_build_hdr(unsigned char *buf, PROXYSOCKADDRTYPE *addr); extern struct auth authfuncs[]; int reload (void); -extern int demon; unsigned char * mycrypt(const unsigned char *key, const unsigned char *salt, unsigned char *buf); unsigned char * ntpwdhash (unsigned char *szHash, const unsigned char *szPassword, int tohex); diff --git a/src/structures.h b/src/structures.h index e4f2d63..b84a9ce 100644 --- a/src/structures.h +++ b/src/structures.h @@ -671,7 +671,6 @@ struct srvparam { int o_nsfd; #endif struct auth *authenticate; - struct pollfd * srvfds; struct ace *acl; #ifdef WITH_HTTPSRV struct httprule *httprules; @@ -862,7 +861,7 @@ struct extparam { struct trafcount * trafcounter; struct srvparam *services; int stacksize, - counterd, haveerror, rotate, paused, archiverc, + counterd, rotate, paused, archiverc, demon, maxchild, backlog, version, noforce, bandlimver, parentretries; unsigned authcachetype, authcachetime; int filtermaxsize; diff --git a/src/webadmin.c b/src/webadmin.c index 13ee2b6..8683470 100644 --- a/src/webadmin.c +++ b/src/webadmin.c @@ -503,7 +503,6 @@ int op_admin_services(struct httpreq *r, const unsigned char *params) { struct clientparam *param = r->param; struct printparam pp; - char *buf; const char *sel; if(param->srv->s_option) return op_admin(r, params); @@ -514,7 +513,6 @@ int op_admin_services(struct httpreq *r, const unsigned char *params) wrapper the other pages share. */ pp.inbuf = 0; pp.cp = param; - buf = NULL; if(sel[0] == 'X') printstr(&pp, style); else {