allow make distcheck to succeed (bb #1142)

fix some more warnings
  filter -Werror in clamav-milter.c

git-svn: trunk@4141
remotes/push_mirror/0.95
Török Edvin 18 years ago
parent 341faf6051
commit 7959343dc7
  1. 2
      Makefile.am
  2. 20
      Makefile.in
  3. 4
      clamav-milter/Makefile.am
  4. 2
      clamav-milter/Makefile.in
  5. 1
      clamd/others.c
  6. 2
      clamd/session.c
  7. 5
      libclamav/htmlnorm.c
  8. 1
      libclamav/mbox.c
  9. 3
      libclamav/phishcheck.c
  10. 2
      libclamav/upack.c
  11. 5
      libclamunrar/unrarppm.c
  12. 1
      libclamunrar_iface/unrar_iface.c
  13. 2
      shared/network.c
  14. 3
      sigtool/vba.c

@ -28,6 +28,6 @@ pkgconfig_DATA = libclamav.pc
# don't complain that configuration files and databases are not removed, this is intended
distuninstallcheck_listfiles = find . -type f ! -name clamd.conf ! -name freshclam.conf ! -name daily.cvd ! -name main.cvd -print
DISTCLEANFILES = target.h
DISTCHECK_CONFIGURE_FLAGS=--enable-milter CFLAGS="-Wno-pointer-sign -Wno-error=attributes -Werror-implicit-function-declaration -Werror -Wextra -Wall -Wbad-function-cast -Wcast-align -Wendif-labels -Wfloat-equal -Wformat=2 -Wmissing-declarations -Wmissing-prototypes -Wno-error=missing-prototypes -Wnested-externs -Wno-error=nested-externs -Wpointer-arith -Wstrict-prototypes -Wno-error=strict-prototypes -Wno-switch -Wno-switch-enum -Wundef -Wwrite-strings -Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute -Wpadded -Wno-error=type-limits -Wno-error=unused-value -Wno-error=unused-variable -Wcast-qual -Wno-error=cast-qual -Wno-error=sign-compare -Wshadow -Wno-error=shadow -Wno-error=uninitialized -fdiagnostics-show-option -Wno-unused-parameter -Wpacked -Wno-error=packed -Wno-error=unreachable-code -Winvalid-pch -Wno-error=invalid-pch -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector -Wno-error=padded"
DISTCHECK_CONFIGURE_FLAGS=--enable-milter CFLAGS="-Wno-pointer-sign -Wno-error=attributes -Werror-implicit-function-declaration -Werror -Wextra -Wall -Wbad-function-cast -Wcast-align -Wendif-labels -Wfloat-equal -Wformat=2 -Wmissing-declarations -Wmissing-prototypes -Wno-error=missing-prototypes -Wnested-externs -Wno-error=nested-externs -Wpointer-arith -Wstrict-prototypes -Wno-error=strict-prototypes -Wno-switch -Wno-switch-enum -Wundef -Wwrite-strings -Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute -Wno-error=missing-format-attribute -Wpadded -Wno-error=type-limits -Wno-error=unused-value -Wno-error=unused-variable -Wcast-qual -Wno-error=cast-qual -Wno-error=sign-compare -Wshadow -Wno-error=shadow -Wno-error=uninitialized -fdiagnostics-show-option -Wno-unused-parameter -Wpacked -Wno-error=packed -Wno-error=unreachable-code -Winvalid-pch -Wno-error=invalid-pch -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector -Wno-error=padded"
lcov:
($(MAKE); cd unit_tests; $(MAKE) lcov)

@ -263,7 +263,25 @@ pkgconfig_DATA = libclamav.pc
# don't complain that configuration files and databases are not removed, this is intended
distuninstallcheck_listfiles = find . -type f ! -name clamd.conf ! -name freshclam.conf ! -name daily.cvd ! -name main.cvd -print
DISTCLEANFILES = target.h
DISTCHECK_CONFIGURE_FLAGS = --enable-milter CFLAGS="-Wno-pointer-sign -Wno-error=attributes -Werror-implicit-function-declaration -Werror -Wextra -Wall -Wbad-function-cast -Wcast-align -Wendif-labels -Wfloat-equal -Wformat=2 -Wmissing-declarations -Wmissing-prototypes -Wno-error=missing-prototypes -Wnested-externs -Wno-error=nested-externs -Wpointer-arith -Wstrict-prototypes -Wno-error=strict-prototypes -Wno-switch -Wno-switch-enum -Wundef -Wwrite-strings -Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute -Wpadded -Wno-error=type-limits -Wno-error=unused-value -Wno-error=unused-variable -Wcast-qual -Wno-error=cast-qual -Wno-error=sign-compare -Wshadow -Wno-error=shadow -Wno-error=uninitialized -fdiagnostics-show-option -Wno-unused-parameter -Wpacked -Wno-error=packed -Wno-error=unreachable-code -Winvalid-pch -Wno-error=invalid-pch -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector -Wno-error=padded"
DISTCHECK_CONFIGURE_FLAGS = --enable-milter CFLAGS="-Wno-pointer-sign \
-Wno-error=attributes -Werror-implicit-function-declaration \
-Werror -Wextra -Wall -Wbad-function-cast -Wcast-align \
-Wendif-labels -Wfloat-equal -Wformat=2 -Wmissing-declarations \
-Wmissing-prototypes -Wno-error=missing-prototypes \
-Wnested-externs -Wno-error=nested-externs -Wpointer-arith \
-Wstrict-prototypes -Wno-error=strict-prototypes -Wno-switch \
-Wno-switch-enum -Wundef -Wwrite-strings -Wstrict-overflow=1 \
-Winit-self -Wmissing-include-dirs -Wstrict-aliasing \
-Wdeclaration-after-statement -Waggregate-return \
-Wmissing-format-attribute -Wno-error=missing-format-attribute \
-Wpadded -Wno-error=type-limits -Wno-error=unused-value \
-Wno-error=unused-variable -Wcast-qual -Wno-error=cast-qual \
-Wno-error=sign-compare -Wshadow -Wno-error=shadow \
-Wno-error=uninitialized -fdiagnostics-show-option \
-Wno-unused-parameter -Wpacked -Wno-error=packed \
-Wno-error=unreachable-code -Winvalid-pch \
-Wno-error=invalid-pch -O2 -D_FORTIFY_SOURCE=2 \
-fstack-protector-all -Wstack-protector -Wno-error=padded"
all: clamav-config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

@ -34,7 +34,6 @@ clamav_milter_SOURCES = \
$(top_srcdir)/shared/network.c \
$(top_srcdir)/shared/network.h \
clamav-milter.c
man_MANS = $(top_builddir)/docs/man/clamav-milter.8
endif
@ -44,3 +43,6 @@ LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMAV_MILTER_LIBS@ @THREAD_LIBS@
AM_CPPFLAGS = -I$(top_srcdir)/clamd -I$(top_srcdir)/libclamav -I$(top_srcdir)/shared -I$(top_srcdir)
EXTRA_DIST = clamav-milter.c INSTALL
CLEANFILES=*.gcda *.gcno
CFLAGS=`echo "@CFLAGS@" | sed -e 's/-Werror[^-]//'`

@ -113,7 +113,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFGDIR = @CFGDIR@
CFLAGS = @CFLAGS@
CFLAGS = `echo "@CFLAGS@" | sed -e 's/-Werror[^-]//'`
CHECK_CFLAGS = @CHECK_CFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@

@ -354,7 +354,6 @@ int writen(int fd, void *buff, unsigned int count)
*/
int readsock(int sockfd, char *buf, size_t size, unsigned char delim, int timeout_sec, int force_delim, int read_command)
{
int fd;
ssize_t n;
size_t boff = 0;
char *pdelim;

@ -116,7 +116,7 @@ static int recvfd_and_scan(int desc, const struct cl_engine *engine, const struc
int command(int desc, const struct cl_engine *engine, const struct cl_limits *limits, unsigned int options, const struct cfgstruct *copt, int timeout)
{
char buff[1025];
int bread, opt;
int bread;
bread = readsock(desc, buff, sizeof(buff)-1, '\n', timeout, 0, 1);
if(bread == -2) /* timeout */

@ -583,7 +583,7 @@ static int cli_html_normalise(int fd, m_area_t *m_area, const char *dirname, tag
{
int fd_tmp, tag_length, tag_arg_length, binary;
int retval=FALSE, escape, value = 0, hex, tag_val_length=0;
int look_for_screnc=FALSE, in_screnc=FALSE,in_script=FALSE, text_space_written=FALSE, spacew=FALSE;
int look_for_screnc=FALSE, in_screnc=FALSE,in_script=FALSE, text_space_written=FALSE;
FILE *stream_in = NULL;
html_state state=HTML_NORM, next_state=HTML_BAD_STATE, saved_next_state=HTML_BAD_STATE;
char filename[1024], tag[HTML_STR_LENGTH+1], tag_arg[HTML_STR_LENGTH+1];
@ -601,7 +601,6 @@ static int cli_html_normalise(int fd, m_area_t *m_area, const char *dirname, tag
unsigned char* in_form_action = NULL;/* the action URL of the current <form> tag, if any*/
struct entity_conv conv;
int rc;
unsigned char entity_val[HTML_STR_LENGTH+1];
size_t entity_val_length = 0;
const int dconf_entconv = dconf && dconf->phishing&PHISHING_CONF_ENTCONV;
@ -1720,7 +1719,7 @@ int html_normalise_fd(int fd, const char *dirname, tag_arguments_t *hrefs,const
int html_screnc_decode(int fd, const char *dirname)
{
int fd_tmp, result, count, retval=FALSE;
int fd_tmp, count, retval=FALSE;
unsigned char *line, tmpstr[6];
unsigned char *ptr, filename[1024];
FILE *stream_in;

@ -4534,7 +4534,6 @@ my_r_gethostbyname(const char *hostname, struct hostent *hp, char *buf, size_t l
return h_errno;
#else
/* Single thread the code e.g. VS2005 */
#ifdef CL_THREAD_SAFE
pthread_mutex_lock(&hostent_mutex);
#endif

@ -860,7 +860,6 @@ static void free_regex(regex_t* p)
int phishing_init(struct cl_engine* engine)
{
char *url_regex, *realurl_regex;
struct phishcheck* pchk;
if(!engine->phishcheck) {
pchk = engine->phishcheck = cli_malloc(sizeof(struct phishcheck));
@ -1252,7 +1251,7 @@ static int url_hash_match(const struct regex_matcher *rlist, const char *inurl,
else k = 1;
pp[k++] = 0;
while(k < COMPONENTS+2) {
const char *p = strchr(path_begin + pp[k-1] + 1, '/');
p = strchr(path_begin + pp[k-1] + 1, '/');
if(p && p > path_begin) {
pp[k++] = p - path_begin;
} else

@ -56,7 +56,7 @@ enum { UPACK_399, UPACK_11_12, UPACK_0151477, UPACK_0297729 };
int unupack(int upack, char *dest, uint32_t dsize, char *buff, uint32_t vma, uint32_t ep, uint32_t base, uint32_t va, int file)
{
int j, searchval;
char *loc_esi, *loc_edi, *loc_ebx, *end_edi, *save_edi, *rpeb, *alvalue;
char *loc_esi, *loc_edi, *loc_ebx, *end_edi, *save_edi, *alvalue;
char *paddr, *pushed_esi, *save2;
uint32_t save1, save3, loc_ecx, count, shlsize, original_ep, ret, loc_ebx_u;
struct cli_exe_section section;

@ -434,7 +434,7 @@ static int restart_model_rare(ppm_data_t *ppm_data)
static int start_model_rare(ppm_data_t *ppm_data, int max_order)
{
int i, k, m, step, ret;
int i, k, m, step;
ppm_data->esc_count = 1;
ppm_data->max_order = max_order;
@ -630,8 +630,7 @@ static int update_model(ppm_data_t *ppm_data)
struct state_tag fs, *p;
struct ppm_context *pc, *successor;
unsigned int ns1, ns, cf, sf, s0;
int ret;
rar_dbgmsg("in update_model\n");
fs = *ppm_data->found_state;
p = NULL;

@ -379,7 +379,6 @@ int unrar_extract_next_prepare(unrar_state_t *state, const char *dirname)
char filename[1024];
int ofd;
unrar_metadata_t *new_metadata;
unpack_data_t *unpack_data;
state->file_header = read_block(state->fd, FILE_HEAD);

@ -62,8 +62,10 @@ int r_gethostbyname(const char *hostname, struct hostent *hp, char *buf, size_t
{
struct hostent *hp2;
int ret = -1;
#if !defined(HAVE_GETHOSTBYNAME_R_6) && !defined(HAVE_GETHOSTBYNAME_R_5) && !defined(HAVE_GETHOSTBYNAME_R_3)
#ifdef CL_THREAD_SAFE
static pthread_mutex_t hostent_mutex = PTHREAD_MUTEX_INITIALIZER;
#endif
#endif
if((hostname == NULL) || (hp == NULL))

@ -791,6 +791,9 @@ static void print_hex_buff (unsigned char *start, unsigned char *end, int hex_ou
printf ("]\n");
}
#ifdef __GNUC__
static void wm_decode_macro (unsigned char *buff, uint32_t len, int hex_output) __attribute__((unused));
#endif
static void wm_decode_macro (unsigned char *buff, uint32_t len, int hex_output)
{
uint32_t i;

Loading…
Cancel
Save