mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
fix some compiler warnings, patch by Stefan Huehner <stefan*huehner.org>
git-svn: trunk@1778
This commit is contained in:
parent
9f2024cc93
commit
079229d60d
26 changed files with 42 additions and 25 deletions
|
@ -1,3 +1,7 @@
|
|||
Sat Dec 10 19:45:48 CET 2005 (tk)
|
||||
---------------------------------
|
||||
* fix some compiler warnings, patch by Stefan Huehner <stefan*huehner.org>
|
||||
|
||||
Tue Nov 29 16:31:23 GMT 2005 (trog)
|
||||
-----------------------------------
|
||||
* libclamav/unrar/unrar.c unrarvm.c: #include clamav-config.h
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
#include "memory.h"
|
||||
#include "cfgparser.h"
|
||||
#include "session.h"
|
||||
#include "others.h"
|
||||
|
||||
#define ENV_FILE "CLAM_VIRUSEVENT_FILENAME"
|
||||
#define ENV_VIRUS "CLAM_VIRUSEVENT_VIRUSNAME"
|
||||
|
|
|
@ -68,7 +68,7 @@ dev_t procdev; /* /proc device */
|
|||
# endif
|
||||
#endif
|
||||
|
||||
int checksymlink(const char *path)
|
||||
static int checksymlink(const char *path)
|
||||
{
|
||||
struct stat statbuf;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#define FALSE (0)
|
||||
#define TRUE (1)
|
||||
|
||||
work_queue_t *work_queue_new()
|
||||
static work_queue_t *work_queue_new(void)
|
||||
{
|
||||
work_queue_t *work_q;
|
||||
|
||||
|
@ -40,7 +40,7 @@ work_queue_t *work_queue_new()
|
|||
return work_q;
|
||||
}
|
||||
|
||||
void work_queue_add(work_queue_t *work_q, void *data)
|
||||
static void work_queue_add(work_queue_t *work_q, void *data)
|
||||
{
|
||||
work_item_t *work_item;
|
||||
|
||||
|
@ -63,7 +63,7 @@ void work_queue_add(work_queue_t *work_q, void *data)
|
|||
return;
|
||||
}
|
||||
|
||||
void *work_queue_pop(work_queue_t *work_q)
|
||||
static void *work_queue_pop(work_queue_t *work_q)
|
||||
{
|
||||
work_item_t *work_item;
|
||||
void *data;
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
void move_infected(const char *filename, const struct optstruct *opt);
|
||||
int notremoved = 0, notmoved = 0;
|
||||
|
||||
int dsresult(int sockd, const struct optstruct *opt)
|
||||
static int dsresult(int sockd, const struct optstruct *opt)
|
||||
{
|
||||
int infected = 0, waserror = 0;
|
||||
char buff[4096], *pt;
|
||||
|
@ -109,7 +109,7 @@ int dsresult(int sockd, const struct optstruct *opt)
|
|||
return infected ? infected : (waserror ? -1 : 0);
|
||||
}
|
||||
|
||||
int dsfile(int sockd, const char *filename, const struct optstruct *opt)
|
||||
static int dsfile(int sockd, const char *filename, const struct optstruct *opt)
|
||||
{
|
||||
int ret;
|
||||
char *scancmd;
|
||||
|
@ -137,7 +137,7 @@ int dsfile(int sockd, const char *filename, const struct optstruct *opt)
|
|||
#if defined(ENABLE_FD_PASSING) && defined(HAVE_SENDMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR)) && !defined(C_CYGWIN)
|
||||
|
||||
/* Submitted by Richard Lyons <frob-clamav*webcentral.com.au> */
|
||||
int dsfd(int sockfd, int fd, const struct optstruct *opt)
|
||||
static int dsfd(int sockfd, int fd, const struct optstruct *opt)
|
||||
{
|
||||
struct iovec iov[1];
|
||||
struct msghdr msg;
|
||||
|
@ -177,13 +177,13 @@ int dsfd(int sockfd, int fd, const struct optstruct *opt)
|
|||
return dsresult(sockfd, opt);
|
||||
}
|
||||
#else
|
||||
int dsfd(int sockfd, int fd, const struct optstruct *opt)
|
||||
static int dsfd(int sockfd, int fd, const struct optstruct *opt)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int dsstream(int sockd, const struct optstruct *opt)
|
||||
static int dsstream(int sockd, const struct optstruct *opt)
|
||||
{
|
||||
int wsockd, loopw = 60, bread, port, infected = 0;
|
||||
struct sockaddr_in server;
|
||||
|
@ -275,7 +275,7 @@ int dsstream(int sockd, const struct optstruct *opt)
|
|||
return infected;
|
||||
}
|
||||
|
||||
char *abpath(const char *filename)
|
||||
static char *abpath(const char *filename)
|
||||
{
|
||||
struct stat foo;
|
||||
char *fullpath, cwd[200];
|
||||
|
@ -300,7 +300,7 @@ char *abpath(const char *filename)
|
|||
return fullpath;
|
||||
}
|
||||
|
||||
int dconnect(const struct optstruct *opt)
|
||||
static int dconnect(const struct optstruct *opt)
|
||||
{
|
||||
struct sockaddr_un server;
|
||||
struct sockaddr_in server2;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include "memory.h"
|
||||
#include "output.h"
|
||||
#include "dns.h"
|
||||
|
||||
#ifndef PACKETSZ
|
||||
#define PACKETSZ 512
|
||||
|
|
|
@ -588,7 +588,7 @@ int wwwconnect(const char *server, const char *proxy, int pport, char *ip, char
|
|||
return -2;
|
||||
}
|
||||
|
||||
int Rfc2822DateTime(char *buf, time_t mtime)
|
||||
static int Rfc2822DateTime(char *buf, time_t mtime)
|
||||
{
|
||||
struct tm *time;
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "others.h"
|
||||
#include "dsig.h"
|
||||
#include "str.h"
|
||||
#include "cvd.h"
|
||||
|
||||
#define TAR_BLOCKSIZE 512
|
||||
|
||||
|
@ -274,7 +275,7 @@ void cl_cvdfree(struct cl_cvd *cvd)
|
|||
free(cvd);
|
||||
}
|
||||
|
||||
int cli_cvdverify(FILE *fd, struct cl_cvd *cvdpt)
|
||||
static int cli_cvdverify(FILE *fd, struct cl_cvd *cvdpt)
|
||||
{
|
||||
struct cl_cvd *cvd;
|
||||
char *md5, head[513];
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#include "pe.h"
|
||||
#include "rebuildpe.h"
|
||||
#include "others.h"
|
||||
#include "fsg.h"
|
||||
|
||||
#if WORDS_BIGENDIAN == 0
|
||||
#define EC16(v) (v)
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "others.h"
|
||||
#include "cltypes.h"
|
||||
#include "matcher.h"
|
||||
#include "matcher-bm.h"
|
||||
|
||||
/* TODO: Check prefix regularity and automatically transfer some signatures
|
||||
* to AC
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include "clamav.h"
|
||||
#include "matcher.h"
|
||||
#include "matcher-bm.h"
|
||||
|
||||
int cli_bm_addpatt(struct cli_matcher *root, struct cli_bm_patt *pattern);
|
||||
int cli_bm_init(struct cli_matcher *root);
|
||||
|
|
|
@ -39,3 +39,4 @@ typedef enum {
|
|||
|
||||
size_t strstrip(char *s); /* remove trailing white space */
|
||||
const char *cli_pmemstr(const char *haystack, size_t hs, const char *needle, size_t ns);
|
||||
int cli_mbox(const char *dir, int desc, unsigned int options);
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#endif
|
||||
#include "cltypes.h"
|
||||
#include "others.h"
|
||||
#include "msexpand.h"
|
||||
|
||||
int cli_msexpand(FILE *in, FILE *out)
|
||||
{
|
||||
|
|
|
@ -354,7 +354,7 @@ static int lzxd_read_lens(struct lzxd_stream *lzx, unsigned char *lens,
|
|||
static unsigned int position_base[51];
|
||||
static unsigned char extra_bits[51];
|
||||
|
||||
static void lzxd_static_init() {
|
||||
static void lzxd_static_init(void) {
|
||||
int i, j;
|
||||
|
||||
for (i = 0, j = 0; i < 51; i += 2) {
|
||||
|
|
|
@ -119,7 +119,7 @@ static int qtmd_read_input(struct qtmd_stream *qtm) {
|
|||
static unsigned int position_base[42];
|
||||
static unsigned char extra_bits[42], length_base[27], length_extra[27];
|
||||
|
||||
static void qtmd_static_init() {
|
||||
static void qtmd_static_init(void) {
|
||||
unsigned int i, offset;
|
||||
|
||||
for (i = 0, offset = 0; i < 42; i++) {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <mspack.h>
|
||||
#include "others.h"
|
||||
#include "system.h"
|
||||
|
||||
int mspack_version(int entity) {
|
||||
switch (entity) {
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
|
||||
#include "cltypes.h"
|
||||
#include "others.h"
|
||||
#include "ole2_extract.h"
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE (0)
|
||||
|
|
|
@ -697,7 +697,7 @@ static unsigned long nearest_power(unsigned long num)
|
|||
return n;
|
||||
}
|
||||
|
||||
bitset_t *cli_bitset_init()
|
||||
bitset_t *cli_bitset_init(void)
|
||||
{
|
||||
bitset_t *bs;
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ char *cli_gentempdesc(const char *dir, int *fd);
|
|||
char *cli_gentempstream(const char *dir, FILE **fs);
|
||||
unsigned int cli_rndnum(unsigned int max);
|
||||
int cli_filecopy(const char *src, const char *dest);
|
||||
bitset_t *cli_bitset_init();
|
||||
bitset_t *cli_bitset_init(void);
|
||||
void cli_bitset_free(bitset_t *bs);
|
||||
int cli_bitset_set(bitset_t *bs, unsigned long bit_offset);
|
||||
int cli_bitset_test(bitset_t *bs, unsigned long bit_offset);
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
#include "pe.h"
|
||||
#include "rebuildpe.h"
|
||||
#include "others.h"
|
||||
#include "petite.h"
|
||||
|
||||
#if WORDS_BIGENDIAN == 0
|
||||
#define EC32(v) (v)
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "clamav.h"
|
||||
#include "others.h"
|
||||
#include "cltypes.h"
|
||||
#include "special.h"
|
||||
|
||||
#define FALSE (0)
|
||||
#define TRUE (1)
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
#include "pe.h"
|
||||
#include "rebuildpe.h"
|
||||
#include "others.h"
|
||||
#include "spin.h"
|
||||
|
||||
#if WORDS_BIGENDIAN == 0
|
||||
#define EC32(v) (v)
|
||||
|
|
|
@ -61,7 +61,7 @@ int rar_filter_array_add(rar_filter_array_t *filter_a, int num)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
struct UnpackFilter *rar_filter_new()
|
||||
struct UnpackFilter *rar_filter_new(void)
|
||||
{
|
||||
struct UnpackFilter *filter;
|
||||
|
||||
|
|
|
@ -34,6 +34,6 @@ typedef struct rar_filter_array_tag
|
|||
void rar_filter_array_init(rar_filter_array_t *filter_a);
|
||||
void rar_filter_array_reset(rar_filter_array_t *filter_a);
|
||||
int rar_filter_array_add(rar_filter_array_t *filter_a, int num);
|
||||
struct UnpackFilter *rar_filter_new();
|
||||
struct UnpackFilter *rar_filter_new(void);
|
||||
void rar_filter_delete(struct UnpackFilter *filter);
|
||||
#endif
|
||||
|
|
|
@ -213,7 +213,7 @@ void sigtool(struct optstruct *opt)
|
|||
|
||||
}
|
||||
|
||||
int countlines(const char *filename)
|
||||
static int countlines(const char *filename)
|
||||
{
|
||||
FILE *fd;
|
||||
char buff[65536];
|
||||
|
|
|
@ -76,7 +76,7 @@ static char *get_unicode_name (char *name, int size)
|
|||
return newname;
|
||||
}
|
||||
|
||||
void output_token (unsigned char token)
|
||||
static void output_token (unsigned char token)
|
||||
{
|
||||
int i;
|
||||
mac_token_t mac_token[] = {
|
||||
|
@ -172,7 +172,7 @@ void output_token (unsigned char token)
|
|||
return;
|
||||
}
|
||||
|
||||
void output_token67 (uint16_t token)
|
||||
static void output_token67 (uint16_t token)
|
||||
{
|
||||
int i;
|
||||
mac_token2_t mac_token[] = {
|
||||
|
@ -522,7 +522,7 @@ void output_token67 (uint16_t token)
|
|||
return;
|
||||
}
|
||||
|
||||
void output_token73 (uint16_t token)
|
||||
static void output_token73 (uint16_t token)
|
||||
{
|
||||
int i;
|
||||
mac_token2_t mac_token[] = {
|
||||
|
@ -773,7 +773,7 @@ void output_token73 (uint16_t token)
|
|||
return;
|
||||
}
|
||||
|
||||
void print_hex_buff (unsigned char *start, unsigned char *end, int hex_output)
|
||||
static void print_hex_buff (unsigned char *start, unsigned char *end, int hex_output)
|
||||
{
|
||||
if (!hex_output) {
|
||||
return;
|
||||
|
@ -786,7 +786,7 @@ void print_hex_buff (unsigned char *start, unsigned char *end, int hex_output)
|
|||
printf ("]\n");
|
||||
}
|
||||
|
||||
void wm_decode_macro (unsigned char *buff, uint32_t len, int hex_output)
|
||||
static void wm_decode_macro (unsigned char *buff, uint32_t len, int hex_output)
|
||||
{
|
||||
int i, j;
|
||||
uint8_t s_length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue