[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-167-g4319a8f
tkojm
tkojm at 77e5149b-7576-45b1-b177-96237e5ba77b
Fri Jun 12 19:11:55 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 2333641e9cea49e97f7c3410ca1e97d7c4022874
Author: tkojm <tkojm at 77e5149b-7576-45b1-b177-96237e5ba77b>
Date: Tue May 5 14:31:53 2009 +0000
shared: fix compiler warnings
git-svn-id: http://svn.clamav.net/svn/clamav-devel/trunk@5060 77e5149b-7576-45b1-b177-96237e5ba77b
diff --git a/ChangeLog b/ChangeLog
index b1f0ea0..0f051cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue May 5 16:31:14 CEST 2009 (tk)
+----------------------------------
+ * shared: fix compiler warnings
+
Tue May 5 15:30:26 CEST 2009 (tk)
----------------------------------
* shared/optparser.[ch]: properly handle large size values (bb#1583)
diff --git a/shared/actions.c b/shared/actions.c
index 22c296f..6152cbe 100644
--- a/shared/actions.c
+++ b/shared/actions.c
@@ -35,6 +35,7 @@
#include "shared/optparser.h"
#include "shared/output.h"
#include "shared/misc.h"
+#include "shared/actions.h"
void (*action)(const char *) = NULL;
unsigned int notmoved = 0, notremoved = 0;
@@ -44,7 +45,7 @@ static int targlen;
-int getdest(const char *fullpath, char **newname) {
+static int getdest(const char *fullpath, char **newname) {
char *tmps, *filename;
int fd, i;
@@ -118,7 +119,7 @@ static void action_remove(const char *filename) {
}
}
-int isdir() {
+static int isdir(void) {
struct stat sb;
if(stat(actarget, &sb) || !S_ISDIR(sb.st_mode)) {
logg("!'%s' doesn't exist or is not a directory\n", actarget);
diff --git a/shared/getopt.c b/shared/getopt.c
index f50e928..1f0e9f7 100644
--- a/shared/getopt.c
+++ b/shared/getopt.c
@@ -46,7 +46,7 @@ int getopt_reset(void)
/* if you're porting some piece of UNIX software, this is all you need. */
/* this supports GNU-style permution and optional arguments */
-int getopt(int argc, char * const argvc[], const char *opts)
+int getopt(int argc, char *argvc[], const char *opts)
{
char **argv = (char**)argvc;
static int charind=0;
diff --git a/shared/getopt.h b/shared/getopt.h
index b9b2225..b4a08f6 100644
--- a/shared/getopt.h
+++ b/shared/getopt.h
@@ -34,7 +34,7 @@ extern "C" {
extern int getopt_reset(void);
/* UNIX-style short-argument parser */
-extern int getopt(int argc, char * const argv[], const char *opts);
+extern int getopt(int argc, char *argv[], const char *opts);
extern int optind, opterr, optopt;
extern char *optarg;
diff --git a/shared/misc.c b/shared/misc.c
index 2021e1e..24869fd 100644
--- a/shared/misc.c
+++ b/shared/misc.c
@@ -118,7 +118,7 @@ char *freshdbdir(void)
void print_version(const char *dbdir)
{
- char *fdbdir, *path;
+ char *fdbdir = NULL, *path;
const char *pt;
struct cl_cvd *daily;
diff --git a/shared/output.c b/shared/output.c
index c333cb5..5e8b62e 100644
--- a/shared/output.c
+++ b/shared/output.c
@@ -96,7 +96,7 @@ short int mprintf_disabled = 0, mprintf_verbose = 0, mprintf_quiet = 0,
#define ARGLEN(args, str, len) \
{ \
- int arglen = 0, i; \
+ size_t arglen = 0, i; \
char *pt; \
va_start(args, str); \
len = strlen(str); \
@@ -131,7 +131,8 @@ int mdprintf(int desc, const char *str, ...)
{
va_list args;
char buffer[512], *abuffer = NULL, *buff;
- int bytes, todo, len, ret=0;
+ int bytes, todo, ret=0;
+ size_t len;
ARGLEN(args, str, len);
@@ -240,7 +241,7 @@ int logg(const char *str, ...)
time_t currtime;
struct stat sb;
mode_t old_umask;
- int len;
+ size_t len;
if ((*str == '$' && logg_verbose < 2) ||
(*str == '*' && !logg_verbose))
@@ -374,7 +375,7 @@ void mprintf(const char *str, ...)
va_list args;
FILE *fd;
char buffer[512], *abuffer = NULL, *buff;
- int len;
+ size_t len;
if(mprintf_disabled)
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list