Browse code

fix some warnings

Tomasz Kojm authored on 2011/09/16 23:25:53
Showing 2 changed files
... ...
@@ -193,7 +193,7 @@ static int qcompare(const void *a, const void *b)
193 193
 }
194 194
 #endif
195 195
 
196
-static int wwwconnect(const char *server, const char *proxy, int pport, char *ip, const char *localip, int ctimeout, struct mirdat *mdat, int logerr, unsigned int can_whitelist, int attempt)
196
+static int wwwconnect(const char *server, const char *proxy, int pport, char *ip, const char *localip, int ctimeout, struct mirdat *mdat, int logerr, unsigned int can_whitelist, unsigned int attempt)
197 197
 {
198 198
 	int socketfd, port, ret;
199 199
 	unsigned int ips = 0, ignored = 0, i;
... ...
@@ -706,7 +706,7 @@ static int Rfc2822DateTime(char *buf, time_t mtime)
706 706
     return strftime(buf, 36, "%a, %d %b %Y %X GMT", gmt);
707 707
 }
708 708
 
709
-static struct cl_cvd *remote_cvdhead(const char *cvdfile, const char *localfile, const char *hostname, char *ip, const char *localip, const char *proxy, int port, const char *user, const char *pass, const char *uas, int *ims, int ctimeout, int rtimeout, struct mirdat *mdat, int logerr, unsigned int can_whitelist, int attempt)
709
+static struct cl_cvd *remote_cvdhead(const char *cvdfile, const char *localfile, const char *hostname, char *ip, const char *localip, const char *proxy, int port, const char *user, const char *pass, const char *uas, int *ims, int ctimeout, int rtimeout, struct mirdat *mdat, int logerr, unsigned int can_whitelist, unsigned int attempt)
710 710
 {
711 711
 	char cmd[512], head[513], buffer[FILEBUFF], ipaddr[46], *ch, *tmp;
712 712
 	int bread, cnt, sd;
... ...
@@ -1069,7 +1069,7 @@ static int getfile_mirman(const char *srcfile, const char *destfile, const char
1069 1069
     return 0;
1070 1070
 }
1071 1071
 
1072
-static int getfile(const char *srcfile, const char *destfile, const char *hostname, char *ip, const char *localip, const char *proxy, int port, const char *user, const char *pass, const char *uas, int ctimeout, int rtimeout, struct mirdat *mdat, int logerr, unsigned int can_whitelist, const char *ims, const struct optstruct *opts, int attempt)
1072
+static int getfile(const char *srcfile, const char *destfile, const char *hostname, char *ip, const char *localip, const char *proxy, int port, const char *user, const char *pass, const char *uas, int ctimeout, int rtimeout, struct mirdat *mdat, int logerr, unsigned int can_whitelist, const char *ims, const struct optstruct *opts, unsigned int attempt)
1073 1073
 {
1074 1074
 	int ret, sd;
1075 1075
 	char ipaddr[46];
... ...
@@ -1099,7 +1099,7 @@ static int getfile(const char *srcfile, const char *destfile, const char *hostna
1099 1099
     return ret;
1100 1100
 }
1101 1101
 
1102
-static int getcvd(const char *cvdfile, const char *newfile, const char *hostname, char *ip, const char *localip, const char *proxy, int port, const char *user, const char *pass, const char *uas, unsigned int newver, int ctimeout, int rtimeout, struct mirdat *mdat, int logerr, unsigned int can_whitelist, const struct optstruct *opts, int attempt)
1102
+static int getcvd(const char *cvdfile, const char *newfile, const char *hostname, char *ip, const char *localip, const char *proxy, int port, const char *user, const char *pass, const char *uas, unsigned int newver, int ctimeout, int rtimeout, struct mirdat *mdat, int logerr, unsigned int can_whitelist, const struct optstruct *opts, unsigned int attempt)
1103 1103
 {
1104 1104
 	struct cl_cvd *cvd;
1105 1105
 	int ret;
... ...
@@ -1172,7 +1172,7 @@ static int chdir_tmp(const char *dbname, const char *tmpdir)
1172 1172
     return 0;
1173 1173
 }
1174 1174
 
1175
-static int getpatch(const char *dbname, const char *tmpdir, int version, const char *hostname, char *ip, const char *localip, const char *proxy, int port, const char *user, const char *pass, const char *uas, int ctimeout, int rtimeout, struct mirdat *mdat, int logerr, unsigned int can_whitelist, const struct optstruct *opts, int attempt)
1175
+static int getpatch(const char *dbname, const char *tmpdir, int version, const char *hostname, char *ip, const char *localip, const char *proxy, int port, const char *user, const char *pass, const char *uas, int ctimeout, int rtimeout, struct mirdat *mdat, int logerr, unsigned int can_whitelist, const struct optstruct *opts, unsigned int attempt)
1176 1176
 {
1177 1177
 	char *tempname, patch[32], olddir[512];
1178 1178
 	int ret, fd;
... ...
@@ -1556,7 +1556,7 @@ static int checkdbdir(void)
1556 1556
 
1557 1557
 extern int sigchld_wait;
1558 1558
 
1559
-static int updatedb(const char *dbname, const char *hostname, char *ip, int *signo, const struct optstruct *opts, const char *dnsreply, char *localip, int outdated, struct mirdat *mdat, int logerr, int extra, int attempt)
1559
+static int updatedb(const char *dbname, const char *hostname, char *ip, int *signo, const struct optstruct *opts, const char *dnsreply, char *localip, int outdated, struct mirdat *mdat, int logerr, int extra, unsigned int attempt)
1560 1560
 {
1561 1561
 	struct cl_cvd *current, *remote;
1562 1562
 	const struct optstruct *opt;
... ...
@@ -1857,7 +1857,7 @@ static int updatedb(const char *dbname, const char *hostname, char *ip, int *sig
1857 1857
 	newfile = newfile2;
1858 1858
 	sigchld_wait = 0;/* we need to wait() for the child ourselves */
1859 1859
 	if (test_database_wrap(newfile, newdb, optget(opts, "Bytecode")->enabled)) {
1860
-	    logg("!Failed to load new database: %s\n", cl_strerror(ret));
1860
+	    logg("!Failed to load new database\n");
1861 1861
 	    unlink(newfile);
1862 1862
 	    free(newfile);
1863 1863
 	    return 55;
... ...
@@ -2031,7 +2031,7 @@ static int updatecustomdb(const char *url, int *signo, const struct optstruct *o
2031 2031
 	newfile = newfile2;
2032 2032
 	sigchld_wait = 0;/* we need to wait() for the child ourselves */
2033 2033
 	if (test_database_wrap(newfile, dbname, optget(opts, "Bytecode")->enabled)) {
2034
-	    logg("!Failed to load new database: %s\n", cl_strerror(ret));
2034
+	    logg("!Failed to load new database\n");
2035 2035
 	    unlink(newfile);
2036 2036
 	    free(newfile);
2037 2037
 	    return 55;
... ...
@@ -2072,7 +2072,7 @@ static int updatecustomdb(const char *url, int *signo, const struct optstruct *o
2072 2072
     return 0;
2073 2073
 }
2074 2074
 
2075
-int downloadmanager(const struct optstruct *opts, const char *hostname, int attempt)
2075
+int downloadmanager(const struct optstruct *opts, const char *hostname, unsigned int attempt)
2076 2076
 {
2077 2077
 	time_t currtime;
2078 2078
 	int ret, updated = 0, outdated = 0, signo = 0, logerr;
... ...
@@ -25,7 +25,7 @@
25 25
 
26 26
 #include "shared/optparser.h"
27 27
 
28
-int downloadmanager(const struct optstruct *opts, const char *hostname, int attempt);
28
+int downloadmanager(const struct optstruct *opts, const char *hostname, unsigned int attempt);
29 29
 
30 30
 int submitstats(const char *clamdcfg, const struct optstruct *opts);
31 31