The build took 00h 01m 00s and was NOT successful.
The program in this build is written in the following languages, according to sloccount:
SLOC | Language |
---|---|
14,622 |
ansic |
253 |
makefile |
148 |
sh |
15,023 |
total |
The process tree of the build process is here.
Several sub-process invocations were improper; see the process tree for details. Summary:
To avoid scrolling, you may jump to the last line of the
invocation of makepkg
that was used to build this
package.
Removed vanilla repositories from pacman.conf and added:
Copied permanent toolchain into container-local sysroot
/toolchain_root/arm-linux-androideabi --> /sysroot/arm-linux-androideabi
/toolchain_root/COPYING3.LIB --> /sysroot/COPYING3.LIB
/toolchain_root/sysroot --> /sysroot/sysroot
/toolchain_root/COPYING.RUNTIME --> /sysroot/COPYING.RUNTIME
/toolchain_root/lib --> /sysroot/lib
/toolchain_root/SOURCES --> /sysroot/SOURCES
/toolchain_root/lib64 --> /sysroot/lib64
/toolchain_root/share --> /sysroot/share
/toolchain_root/bin --> /sysroot/bin
/toolchain_root/COPYING --> /sysroot/COPYING
/toolchain_root/COPYING3 --> /sysroot/COPYING3
/toolchain_root/COPYING.LIB --> /sysroot/COPYING.LIB
/toolchain_root/include --> /sysroot/include
/toolchain_root/libexec --> /sysroot/libexec
CMD: sudo -u tuscan PATH=/sysroot/bin:/sysroot/libexec/gcc/arm-linux-androideabi/4.8:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ red makepkg --noextract --syncdeps --skipinteg --skippgpcheck --skipchecksums --noconfirm --nocolor --log --noprogressbar --nocheck
==> Making package: p3scan 2.3.2-11 (Tue Apr 4 21:08:00 UTC 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
gcc -Wall -DLOGOPT="LOG_PID|LOG_CONS" -DLOGFAC="LOG_DAEMON" -c getlinep3.c
gcc -Wall -DLOGOPT="LOG_PID|LOG_CONS" -DLOGFAC="LOG_DAEMON" -c getline_ssl.c
gcc -Wall -DLOGOPT="LOG_PID|LOG_CONS" -DLOGFAC="LOG_DAEMON" -c parsefile.c
gcc -Wall -DLOGOPT="LOG_PID|LOG_CONS" -DLOGFAC="LOG_DAEMON" -c p3scan.c
cc1: error: no include path in which to search for stdc-predef.h
getline_ssl.c:38:19: error: no include path in which to search for stdio.h
#include
^
getline_ssl.c:39:20: error: no include path in which to search for unistd.h
#include
^
getline_ssl.c:40:20: error: no include path in which to search for string.h
#include
^
getline_ssl.c:41:20: error: no include path in which to search for malloc.h
#include
^
getline_ssl.c:42:20: error: no include path in which to search for stdarg.h
#include
^
getline_ssl.c:43:19: error: no include path in which to search for fcntl.h
#include
^
getline_ssl.c:44:22: error: no include path in which to search for sys/time.h
#include
^
getline_ssl.c:45:19: error: no include path in which to search for errno.h
#include
^
getline_ssl.c:46:23: error: no include path in which to search for sys/types.h
#include
^
getline_ssl.c:47:24: error: no include path in which to search for sys/socket.h
#include
^
getline_ssl.c:48:24: error: no include path in which to search for netinet/in.h
#include
^
getline_ssl.c:49:23: error: no include path in which to search for arpa/inet.h
#include
^
getline_ssl.c:50:19: error: no include path in which to search for netdb.h
#include
^
getline_ssl.c:51:20: error: no include path in which to search for stdlib.h
#include
^
getline_ssl.c:52:22: error: no include path in which to search for sys/wait.h
#include
^
In file included from getline_ssl.c:54:0:
getline_ssl.h:42:25: error: no include path in which to search for openssl/ssl.h
#include
^
getline_ssl.h:43:25: error: no include path in which to search for openssl/err.h
#include
^
getline_ssl.h:47:1: error: unknown type name 'BIO'
extern BIO *bio_err;
^
getline_ssl.h:51:1: error: unknown type name 'SSL_CTX'
SSL_CTX *initialize_ctx();
^
getline_ssl.h:52:18: error: unknown type name 'SSL_CTX'
void destroy_ctx(SSL_CTX *ctx);
^
getline_ssl.h:56:2: error: #error "Must use OpenSSL 0.9.6 or later"
#error "Must use OpenSSL 0.9.6 or later"
^
getline_ssl.h:74:17: error: unknown type name 'SSL'
int getline_ssl(SSL * ssl, struct linebuf * l);
^
getline_ssl.h:79:19: error: unknown type name 'SSL'
int writeline_ssl(SSL * ssl, int leading, char * c);
^
getline_ssl.h:84:26: error: unknown type name 'SSL'
int writeline_format_ssl(SSL * ssl, int leading, char * fmt, ...);
^
getline_ssl.h:89:22: error: unknown type name 'SSL'
int secure_write_ssl(SSL * ssl, char * buf, int len);
^
getline_ssl.h:92:24: error: unknown type name 'SSL'
int select_fd_read_ssl(SSL * ssl);
^
getline_ssl.h:96:6: error: unknown type name 'SSL'
SSL ** p_ssl, SSL_CTX ** p_ctx, BIO ** p_sbio);
^
getline_ssl.h:96:20: error: unknown type name 'SSL_CTX'
SSL ** p_ssl, SSL_CTX ** p_ctx, BIO ** p_sbio);
^
getline_ssl.h:96:38: error: unknown type name 'BIO'
SSL ** p_ssl, SSL_CTX ** p_ctx, BIO ** p_sbio);
^
getline_ssl.h:97:33: error: unknown type name 'SSL'
void SSL_destroy_conn(int sock, SSL * ssl, SSL_CTX * ctx, BIO * sbio);
^
getline_ssl.h:97:44: error: unknown type name 'SSL_CTX'
void SSL_destroy_conn(int sock, SSL * ssl, SSL_CTX * ctx, BIO * sbio);
^
getline_ssl.h:97:59: error: unknown type name 'BIO'
void SSL_destroy_conn(int sock, SSL * ssl, SSL_CTX * ctx, BIO * sbio);
^
getline_ssl.c:56:24: error: unknown type name 'size_t'
extern void * w_malloc(size_t bytes);
^
getline_ssl.c: In function 'password_cb':
getline_ssl.c:64:4: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
if(num
#
^
#
getline_ssl.c:64:11: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
if(num
#
^
#
getline_ssl.c:66:4: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
#
strcpy(buf,pass);
#
^
#
getline_ssl.c:66:4: warning: incompatible implicit declaration of built-in function 'strcpy' [enabled by default]
#
getline_ssl.c: At top level:
#
getline_ssl.c:70:1: error: unknown type name 'SSL_CTX'
#
SSL_CTX *initialize_ctx() {
#
^
#
getline_ssl.c: In function 'initialize_ctx':
#
getline_ssl.c:71:4: error: unknown type name 'SSL_METHOD'
#
SSL_METHOD *meth;
#
^
#
getline_ssl.c:72:4: error: unknown type name 'SSL_CTX'
#
SSL_CTX *ctx;
#
^
#
getline_ssl.c:74:4: warning: implicit declaration of function 'SSL_library_init' [-Wimplicit-function-declaration]
#
SSL_library_init();
#
^
#
getline_ssl.c:75:4: warning: implicit declaration of function 'SSL_load_error_strings' [-Wimplicit-function-declaration]
#
SSL_load_error_strings();
#
^
#
getline_ssl.c:78:4: warning: implicit declaration of function 'SSLv23_method' [-Wimplicit-function-declaration]
#
meth=SSLv23_method();
#
^
#
getline_ssl.c:78:8: warning: assignment makes pointer from integer without a cast [enabled by default]
#
meth=SSLv23_method();
#
^
#
getline_ssl.c:79:4: warning: implicit declaration of function 'SSL_CTX_new' [-Wimplicit-function-declaration]
#
ctx=SSL_CTX_new(meth);
#
^
#
getline_ssl.c:79:7: warning: assignment makes pointer from integer without a cast [enabled by default]
#
ctx=SSL_CTX_new(meth);
#
^
#
getline_ssl.c:81:4: warning: implicit declaration of function 'SSL_CTX_set_default_passwd_cb' [-Wimplicit-function-declaration]
#
SSL_CTX_set_default_passwd_cb(ctx, password_cb);
#
^
#
getline_ssl.c:84:5: warning: implicit declaration of function 'SSL_CTX_set_verify_depth' [-Wimplicit-function-declaration]
#
SSL_CTX_set_verify_depth(ctx,1);
#
^
#
getline_ssl.c: At top level:
#
getline_ssl.c:90:22: error: unknown type name 'SSL'
#
int secure_write_ssl(SSL * ssl, char * buf, int len){
#
^
#
getline_ssl.c:111:24: error: unknown type name 'SSL'
#
int select_fd_read_ssl(SSL * ssl){
#
^
#
getline_ssl.c:142:17: error: unknown type name 'SSL'
#
int getline_ssl(SSL * ssl, struct linebuf * l){
#
^
#
getline_ssl.c:224:19: error: unknown type name 'SSL'
#
int writeline_ssl(SSL * ssl, int leading, char * c){
#
^
#
getline_ssl.c:249:26: error: unknown type name 'SSL'
#
int writeline_format_ssl(SSL * ssl, int leading , char * fmt, ...){
#
^
#
getline_ssl.c:274:4: error: unknown type name 'SSL'
#
SSL ** p_ssl, SSL_CTX ** p_ctx, BIO ** p_sbio) {
#
^
#
getline_ssl.c:274:18: error: unknown type name 'SSL_CTX'
#
SSL ** p_ssl, SSL_CTX ** p_ctx, BIO ** p_sbio) {
#
^
#
getline_ssl.c:274:36: error: unknown type name 'BIO'
#
SSL ** p_ssl, SSL_CTX ** p_ctx, BIO ** p_sbio) {
#
^
#
getline_ssl.c:303:33: error: unknown type name 'SSL'
#
void SSL_destroy_conn(int sock, SSL * ssl, SSL_CTX * ctx, BIO * sbio) {
#
^
#
getline_ssl.c:303:44: error: unknown type name 'SSL_CTX'
#
void SSL_destroy_conn(int sock, SSL * ssl, SSL_CTX * ctx, BIO * sbio) {
#
^
#
getline_ssl.c:303:59: error: unknown type name 'BIO'
#
void SSL_destroy_conn(int sock, SSL * ssl, SSL_CTX * ctx, BIO * sbio) {
#
^
#
make: *** [Makefile:83: getline_ssl.o] Error 1
#
make: *** Waiting for unfinished jobs....
#
cc1: error: no include path in which to search for stdc-predef.h
#
getlinep3.c:37:19: error: no include path in which to search for stdio.h
#
#include
#
^
#
getlinep3.c:38:20: error: no include path in which to search for unistd.h
#
#include
#
^
#
getlinep3.c:39:20: error: no include path in which to search for string.h
#
#include
#
^
#
getlinep3.c:40:20: error: no include path in which to search for malloc.h
#
#include
#
^
#
getlinep3.c:41:20: error: no include path in which to search for stdarg.h
#
#include
#
^
#
getlinep3.c:42:19: error: no include path in which to search for fcntl.h
#
#include
#
^
#
getlinep3.c:43:22: error: no include path in which to search for sys/time.h
#
#include
#
^
#
getlinep3.c:44:19: error: no include path in which to search for errno.h
#
#include
#
^
#
getlinep3.c:48:24: error: unknown type name 'size_t'
#
extern void * w_malloc(size_t bytes);
#
^
#
getlinep3.c: In function 'secure_write':
#
getlinep3.c:59:4: warning: implicit declaration of function 'write' [-Wimplicit-function-declaration]
#
while ((i=write(fd, &buf[written], len-written))
#
^
#
getlinep3.c:61:20: error: 'errno' undeclared (first use in this function)
#
if (i==-1 && errno==EPIPE) return GETLINE_PIPE;
#
^
#
getlinep3.c:61:20: note: each undeclared identifier is reported only once for each function it appears in
#
getlinep3.c:61:27: error: 'EPIPE' undeclared (first use in this function)
#
if (i==-1 && errno==EPIPE) return GETLINE_PIPE;
#
^
#
getlinep3.c: In function 'select_fd_read':
#
getlinep3.c:72:4: error: unknown type name 'fd_set'
#
fd_set fds;
#
^
#
getlinep3.c:73:19: error: storage size of 'timeout' isn't known
#
struct timeval timeout;
#
^
#
getlinep3.c:76:4: warning: implicit declaration of function 'FD_ZERO' [-Wimplicit-function-declaration]
#
FD_ZERO(&fds);
#
^
#
getlinep3.c:77:4: warning: implicit declaration of function 'FD_SET' [-Wimplicit-function-declaration]
#
FD_SET(fd, &fds);
#
^
#
getlinep3.c:78:4: warning: implicit declaration of function 'select' [-Wimplicit-function-declaration]
#
return select(fd + 1, &fds, NULL, NULL, &timeout);
#
^
#
getlinep3.c:78:32: error: 'NULL' undeclared (first use in this function)
#
return select(fd + 1, &fds, NULL, NULL, &timeout);
#
^
#
getlinep3.c:73:19: warning: unused variable 'timeout' [-Wunused-variable]
#
struct timeval timeout;
#
^
#
cc1: error: no include path in which to search for stdc-predef.h
#
getlinep3.c: In function 'getlinep3':
#
getlinep3.c:90:7: warning: implicit declaration of function 'read' [-Wimplicit-function-declaration]
#
len=read(fd, l->buf, maxread );
#
^
#
p3scan.c:44:19: error: no include path in which to search for stdio.h
#
#include
#
^
#
p3scan.c:45:20: error: no include path in which to search for stdlib.h
#
#include
#
^
#
getlinep3.c:99:10: warning: implicit declaration of function 'memmove' [-Wimplicit-function-declaration]
#
memmove(l->buf, l->lineend +1, len );
#
^
#
p3scan.c:46:20: error: no include path in which to search for string.h
#
#include
#
^
#
getlinep3.c:99:10: warning: incompatible implicit declaration of built-in function 'memmove' [enabled by default]
#
p3scan.c:47:23: error: no include path in which to search for arpa/inet.h
#
#include
#
^
#
p3scan.c:48:24: error: no include path in which to search for netinet/in.h
#
#include
#
^
#
p3scan.c:49:24: error: no include path in which to search for netinet/ip.h
#
#include
#
^
#
p3scan.c:50:24: error: no include path in which to search for sys/socket.h
#
#include
#
^
#
p3scan.c:51:23: error: no include path in which to search for sys/types.h
#
#include
#
^
#
p3scan.c:52:22: error: no include path in which to search for sys/stat.h
#
#include
#
^
#
p3scan.c:53:19: error: no include path in which to search for fcntl.h
#
#include
#
^
#
p3scan.c:54:20: error: no include path in which to search for unistd.h
#
#include
#
^
#
p3scan.c:55:20: error: no include path in which to search for stdarg.h
#
#include
#
^
#
p3scan.c:56:24: error: no include path in which to search for sys/signal.h
#
#include
#
^
#
p3scan.c:57:22: error: no include path in which to search for sys/wait.h
#
#include
#
^
#
p3scan.c:58:17: error: no include path in which to search for pwd.h
#
#include
#
^
#
cc1: error: no include path in which to search for stdc-predef.h
#
p3scan.c:59:18: error: no include path in which to search for time.h
#
#include
#
^
#
getlinep3.c:117:24: error: 'NULL' undeclared (first use in this function)
#
l->lineend=NULL;
#
^
#
p3scan.c:60:22: error: no include path in which to search for sys/time.h
#
#include
#
^
#
p3scan.c:61:20: error: no include path in which to search for syslog.h
#
#include
#
^
#
p3scan.c:62:23: error: no include path in which to search for sys/param.h
#
#include
#
^
#
p3scan.c:63:19: error: no include path in which to search for ctype.h
#
#include
#
^
#
p3scan.c:64:34: error: no include path in which to search for linux/netfilter_ipv4.h
#
#include
#
^
#
p3scan.c:65:20: error: no include path in which to search for malloc.h
#
#include
#
^
#
p3scan.c:66:20: error: no include path in which to search for getopt.h
#
#include
#
^
#
p3scan.c:67:19: error: no include path in which to search for netdb.h
#
#include
#
^
#
p3scan.c:68:20: error: no include path in which to search for libgen.h
#
#include
#
^
#
p3scan.c:69:19: error: no include path in which to search for errno.h
#
#include
#
^
#
p3scan.c:70:20: error: no include path in which to search for dirent.h
#
#include
#
^
#
p3scan.c:71:25: error: no include path in which to search for sys/statvfs.h
#
#include
#
^
#
p3scan.c:72:20: error: no include path in which to search for assert.h
#
#include
#
^
#
p3scan.c:73:24: error: no include path in which to search for sys/select.h
#
#include
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:40:43: error: no include path in which to search for syslog.h
#
#include /* do_log */
#
^
#
getlinep3.c:147:13: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
#
l->linelen=strlen(l->line);
#
^
#
parsefile.c:68:20: error: no include path in which to search for unistd.h
#
#include
#
^
#
p3scan.h:41:43: error: no include path in which to search for arpa/inet.h
#
#include /* config */
#
^
#
getlinep3.c:147:24: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
l->linelen=strlen(l->line);
#
^
#
parsefile.c:69:19: error: no include path in which to search for stdio.h
#
#include
#
^
#
parsefile.c:70:20: error: no include path in which to search for stdlib.h
#
#include
#
^
#
parsefile.c:71:19: error: no include path in which to search for fcntl.h
#
#include
#
^
#
parsefile.c:72:20: error: no include path in which to search for malloc.h
#
#include
#
^
#
parsefile.c:73:20: error: no include path in which to search for string.h
#
#include
#
^
#
parsefile.c:74:22: error: no include path in which to search for sys/stat.h
#
#include
#
^
#
In file included from p3scan.h:42:0,
#
from p3scan.c:75:
#
getline_ssl.h:42:25: error: no include path in which to search for openssl/ssl.h
#
#include
#
^
#
getlinep3.c: In function 'writeline':
#
getline_ssl.h:43:25: error: no include path in which to search for openssl/err.h
#
#include
#
^
#
getline_ssl.h:47:1: error: unknown type name 'BIO'
#
extern BIO *bio_err;
#
^
#
getlinep3.c:167:4: warning: implicit declaration of function 'w_malloc' [-Wimplicit-function-declaration]
#
out=w_malloc(strlen(c)+3);
#
^
#
getline_ssl.h:51:1: error: unknown type name 'SSL_CTX'
#
SSL_CTX *initialize_ctx();
#
^
#
getline_ssl.h:52:18: error: unknown type name 'SSL_CTX'
#
void destroy_ctx(SSL_CTX *ctx);
#
^
#
getlinep3.c:167:17: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
out=w_malloc(strlen(c)+3);
#
^
#
getline_ssl.h:56:2: error: #error "Must use OpenSSL 0.9.6 or later"
#
#error "Must use OpenSSL 0.9.6 or later"
#
^
#
getline_ssl.h:74:17: error: unknown type name 'SSL'
#
int getline_ssl(SSL * ssl, struct linebuf * l);
#
^
#
getline_ssl.h:79:19: error: unknown type name 'SSL'
#
int writeline_ssl(SSL * ssl, int leading, char * c);
#
^
#
getlinep3.c:167:7: warning: assignment makes pointer from integer without a cast [enabled by default]
#
out=w_malloc(strlen(c)+3);
#
^
#
getline_ssl.h:84:26: error: unknown type name 'SSL'
#
int writeline_format_ssl(SSL * ssl, int leading, char * fmt, ...);
#
^
#
getline_ssl.h:89:22: error: unknown type name 'SSL'
#
int secure_write_ssl(SSL * ssl, char * buf, int len);
#
^
#
getlinep3.c:170:10: warning: implicit declaration of function 'sprintf' [-Wimplicit-function-declaration]
#
len=sprintf(out, "%s", c);
#
^
#
getline_ssl.h:92:24: error: unknown type name 'SSL'
#
int select_fd_read_ssl(SSL * ssl);
#
^
#
getline_ssl.h:96:6: error: unknown type name 'SSL'
#
SSL ** p_ssl, SSL_CTX ** p_ctx, BIO ** p_sbio);
#
^
#
getlinep3.c:170:14: warning: incompatible implicit declaration of built-in function 'sprintf' [enabled by default]
#
len=sprintf(out, "%s", c);
#
^
#
getline_ssl.h:96:20: error: unknown type name 'SSL_CTX'
#
SSL ** p_ssl, SSL_CTX ** p_ctx, BIO ** p_sbio);
#
^
#
getline_ssl.h:96:38: error: unknown type name 'BIO'
#
SSL ** p_ssl, SSL_CTX ** p_ctx, BIO ** p_sbio);
#
^
#
getline_ssl.h:97:33: error: unknown type name 'SSL'
#
void SSL_destroy_conn(int sock, SSL * ssl, SSL_CTX * ctx, BIO * sbio);
#
^
#
getline_ssl.h:97:44: error: unknown type name 'SSL_CTX'
#
void SSL_destroy_conn(int sock, SSL * ssl, SSL_CTX * ctx, BIO * sbio);
#
^
#
In file included from parsefile.c:77:0:
#
p3scan.h:40:43: error: no include path in which to search for syslog.h
#
#include /* do_log */
#
^
#
getline_ssl.h:97:59: error: unknown type name 'BIO'
#
void SSL_destroy_conn(int sock, SSL * ssl, SSL_CTX * ctx, BIO * sbio);
#
^
#
p3scan.h:41:43: error: no include path in which to search for arpa/inet.h
#
#include /* config */
#
^
#
In file included from p3scan.h:42:0,
#
from parsefile.c:77:
#
getline_ssl.h:42:25: error: no include path in which to search for openssl/ssl.h
#
#include
#
^
#
getlinep3.c: In function 'writeline_format':
#
getline_ssl.h:43:25: error: no include path in which to search for openssl/err.h
#
#include
#
^
#
getline_ssl.h:47:1: error: unknown type name 'BIO'
#
extern BIO *bio_err;
#
^
#
getlinep3.c:189:4: error: unknown type name 'va_list'
#
va_list az;
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:170:26: error: field 'client_addr' has incomplete type
#
struct sockaddr_in client_addr;
#
^
#
getline_ssl.h:51:1: error: unknown type name 'SSL_CTX'
#
SSL_CTX *initialize_ctx();
#
^
#
p3scan.h:171:26: error: field 'server_addr' has incomplete type
#
struct sockaddr_in server_addr;
#
^
#
getline_ssl.h:52:18: error: unknown type name 'SSL_CTX'
#
void destroy_ctx(SSL_CTX *ctx);
#
^
#
getlinep3.c:191:4: warning: implicit declaration of function 'va_start' [-Wimplicit-function-declaration]
#
va_start(az,fmt);
#
^
#
p3scan.h:173:4: error: unknown type name 'size_t'
#
size_t socksize;
#
^
#
getline_ssl.h:56:2: error: #error "Must use OpenSSL 0.9.6 or later"
#
#error "Must use OpenSSL 0.9.6 or later"
#
^
#
p3scan.h:174:4: error: unknown type name 'off_t'
#
off_t hdroffset;
#
^
#
getlinep3.c:192:4: warning: implicit declaration of function 'vsnprintf' [-Wimplicit-function-declaration]
#
len=vsnprintf(out, 4090, fmt, az);
#
^
#
getline_ssl.h:74:17: error: unknown type name 'SSL'
#
int getline_ssl(SSL * ssl, struct linebuf * l);
#
^
#
p3scan.h:175:4: error: unknown type name 'time_t'
#
time_t now;
#
^
#
getline_ssl.h:79:19: error: unknown type name 'SSL'
#
int writeline_ssl(SSL * ssl, int leading, char * c);
#
^
#
getline_ssl.h:84:26: error: unknown type name 'SSL'
#
int writeline_format_ssl(SSL * ssl, int leading, char * fmt, ...);
#
^
#
getline_ssl.h:89:22: error: unknown type name 'SSL'
#
int secure_write_ssl(SSL * ssl, char * buf, int len);
#
^
#
p3scan.h:209:4: error: unknown type name 'SSL'
#
SSL * ssl;
#
^
#
getline_ssl.h:92:24: error: unknown type name 'SSL'
#
int select_fd_read_ssl(SSL * ssl);
#
^
#
getlinep3.c: In function 'linebuf_init':
#
p3scan.h:210:4: error: unknown type name 'SSL_CTX'
#
SSL_CTX * ctx;
#
^
#
getline_ssl.h:96:6: error: unknown type name 'SSL'
#
SSL ** p_ssl, SSL_CTX ** p_ctx, BIO ** p_sbio);
#
^
#
p3scan.h:211:4: error: unknown type name 'BIO'
#
BIO * sbio;
#
^
#
getline_ssl.h:96:20: error: unknown type name 'SSL_CTX'
#
SSL ** p_ssl, SSL_CTX ** p_ctx, BIO ** p_sbio);
#
^
#
getlinep3.c:213:5: warning: assignment makes pointer from integer without a cast [enabled by default]
#
l=w_malloc(sizeof(linebuf));
#
^
#
getline_ssl.h:96:38: error: unknown type name 'BIO'
#
SSL ** p_ssl, SSL_CTX ** p_ctx, BIO ** p_sbio);
#
^
#
getlinep3.c:215:10: warning: assignment makes pointer from integer without a cast [enabled by default]
#
l->buf=w_malloc(len);
#
^
#
getline_ssl.h:97:33: error: unknown type name 'SSL'
#
void SSL_destroy_conn(int sock, SSL * ssl, SSL_CTX * ctx, BIO * sbio);
#
^
#
getline_ssl.h:97:44: error: unknown type name 'SSL_CTX'
#
void SSL_destroy_conn(int sock, SSL * ssl, SSL_CTX * ctx, BIO * sbio);
#
^
#
getlinep3.c: In function 'linebuf_zero':
#
getline_ssl.h:97:59: error: unknown type name 'BIO'
#
void SSL_destroy_conn(int sock, SSL * ssl, SSL_CTX * ctx, BIO * sbio);
#
^
#
getlinep3.c:222:15: error: 'NULL' undeclared (first use in this function)
#
l->lineend=NULL;
#
^
#
p3scan.h:250:28: error: field 'addr' has incomplete type
#
struct sockaddr_in addr;
#
^
#
p3scan.h:251:28: error: field 'targetaddr' has incomplete type
#
struct sockaddr_in targetaddr;
#
^
#
getlinep3.c: In function 'linebuf_uninit':
#
getlinep3.c:230:11: error: 'NULL' undeclared (first use in this function)
#
if (l==NULL) return;
#
^
#
p3scan.h:289:3: error: unknown type name 'size_t'
#
size_t size;
#
^
#
In file included from parsefile.c:77:0:
#
p3scan.h:170:26: error: field 'client_addr' has incomplete type
#
struct sockaddr_in client_addr;
#
^
#
p3scan.h:171:26: error: field 'server_addr' has incomplete type
#
struct sockaddr_in server_addr;
#
^
#
In file included from p3scan.c:78:0:
#
scanner.h:56:4: error: 'NULL' undeclared here (not in a function)
#
NULL
#
^
#
p3scan.h:173:4: error: unknown type name 'size_t'
#
size_t socksize;
#
^
#
p3scan.h:174:4: error: unknown type name 'off_t'
#
off_t hdroffset;
#
^
#
p3scan.h:175:4: error: unknown type name 'time_t'
#
time_t now;
#
^
#
getlinep3.c: In function 'select_fd_read':
#
getlinep3.c:79:1: warning: control reaches end of non-void function [-Wreturn-type]
#
}
#
^
#
p3scan.h:209:4: error: unknown type name 'SSL'
#
SSL * ssl;
#
^
#
p3scan.c: In function 'do_sigterm_proxy2':
#
p3scan.h:210:4: error: unknown type name 'SSL_CTX'
#
SSL_CTX * ctx;
#
^
#
p3scan.c:121:4: warning: implicit declaration of function 'fprintf' [-Wimplicit-function-declaration]
#
if(config->debug) fprintf(stderr, "do_sigterm_proxy2, signal %i\n", signr);
#
^
#
p3scan.h:211:4: error: unknown type name 'BIO'
#
BIO * sbio;
#
^
#
p3scan.c:121:22: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
if(config->debug) fprintf(stderr, "do_sigterm_proxy2, signal %i\n", signr);
#
^
#
p3scan.c:121:30: error: 'stderr' undeclared (first use in this function)
#
if(config->debug) fprintf(stderr, "do_sigterm_proxy2, signal %i\n", signr);
#
^
#
p3scan.c:121:30: note: each undeclared identifier is reported only once for each function it appears in
#
p3scan.c:122:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if (global_p == NULL){
#
^
#
p3scan.c:127:4: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]
#
if (global_p->client_fd != -1) close(global_p->client_fd);
#
^
#
p3scan.h:250:28: error: field 'addr' has incomplete type
#
struct sockaddr_in addr;
#
^
#
p3scan.h:251:28: error: field 'targetaddr' has incomplete type
#
struct sockaddr_in targetaddr;
#
^
#
p3scan.c:136:12: warning: assignment from incompatible pointer type [enabled by default]
#
global_p=NULL;
#
^
#
p3scan.c:138:4: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
#
if (signr != -1) exit(1);
#
^
#
p3scan.c:138:21: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
#
if (signr != -1) exit(1);
#
^
#
p3scan.c: In function 'do_log':
#
p3scan.h:289:3: error: unknown type name 'size_t'
#
size_t size;
#
^
#
p3scan.c:145:3: error: unknown type name 'time_t'
#
time_t now = time(NULL);
#
^
#
p3scan.c:145:3: warning: implicit declaration of function 'time' [-Wimplicit-function-declaration]
#
p3scan.c:146:3: error: unknown type name 'va_list'
#
va_list az;
#
^
#
parsefile.c:79:24: error: unknown type name 'size_t'
#
extern void * w_malloc(size_t bytes);
#
^
#
p3scan.c:151:33: error: 'LOG_DEBUG' undeclared (first use in this function)
#
if (!config->debug && level==LOG_DEBUG) return;
#
^
#
p3scan.c:151:31: warning: comparison between pointer and integer [enabled by default]
#
if (!config->debug && level==LOG_DEBUG) return;
#
^
#
parsefile.c: In function 'paramlist_init':
#
p3scan.c:152:50: error: 'LOG_NOTICE' undeclared (first use in this function)
#
if (!config->debug && config->quiet && level==LOG_NOTICE) return;
#
^
#
p3scan.c:152:48: warning: comparison between pointer and integer [enabled by default]
#
if (!config->debug && config->quiet && level==LOG_NOTICE) return;
#
^
#
parsefile.c:86:4: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
#
pl=malloc(sizeof(struct paramlist));
#
^
#
p3scan.c:153:4: warning: implicit declaration of function 'va_start' [-Wimplicit-function-declaration]
#
va_start(az,fmt);
#
^
#
parsefile.c:86:7: warning: incompatible implicit declaration of built-in function 'malloc' [enabled by default]
#
pl=malloc(sizeof(struct paramlist));
#
^
#
p3scan.c:154:4: warning: implicit declaration of function 'vsnprintf' [-Wimplicit-function-declaration]
#
vsnprintf(puffer, 4000, fmt, az);
#
^
#
p3scan.c:155:4: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
#
strcpy(timenow,ctime(&now)+ 11);
#
^
#
p3scan.c:155:4: warning: incompatible implicit declaration of built-in function 'strcpy' [enabled by default]
#
p3scan.c:155:4: warning: implicit declaration of function 'ctime' [-Wimplicit-function-declaration]
#
p3scan.c:155:4: warning: passing argument 2 of 'strcpy' makes pointer from integer without a cast [enabled by default]
#
parsefile.c:88:13: error: 'NULL' undeclared (first use in this function)
#
pl->name=NULL;
#
^
#
p3scan.c:155:4: note: expected 'const char *' but argument is of type 'int'
#
parsefile.c:88:13: note: each undeclared identifier is reported only once for each function it appears in
#
p3scan.c:157:6: warning: implicit declaration of function 'openlog' [-Wimplicit-function-declaration]
#
openlog(config->syslogname, LOGOPT, LOGFAC);
#
^
#
:0:8: error: 'LOG_PID' undeclared (first use in this function)
#
p3scan.c:157:34: note: in expansion of macro 'LOGOPT'
#
openlog(config->syslogname, LOGOPT, LOGFAC);
#
^
#
:0:16: error: 'LOG_CONS' undeclared (first use in this function)
#
p3scan.c:157:34: note: in expansion of macro 'LOGOPT'
#
openlog(config->syslogname, LOGOPT, LOGFAC);
#
^
#
parsefile.c: In function 'paramlist_uninit':
#
:0:15: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
p3scan.c:157:34: note: in expansion of macro 'LOGOPT'
#
openlog(config->syslogname, LOGOPT, LOGFAC);
#
^
#
parsefile.c:98:7: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
#
if ((*p)->name) free((*p)->name);
#
^
#
:0:8: error: 'LOG_DAEMON' undeclared (first use in this function)
#
p3scan.c:157:42: note: in expansion of macro 'LOGFAC'
#
openlog(config->syslogname, LOGOPT, LOGFAC);
#
^
#
parsefile.c:98:23: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]
#
if ((*p)->name) free((*p)->name);
#
^
#
p3scan.c:158:6: warning: implicit declaration of function 'syslog' [-Wimplicit-function-declaration]
#
syslog(LOG_NOTICE, "%s\n", puffer);
#
^
#
p3scan.c:159:6: warning: implicit declaration of function 'closelog' [-Wimplicit-function-declaration]
#
closelog();
#
^
#
p3scan.c:161:6: warning: implicit declaration of function 'fflush' [-Wimplicit-function-declaration]
#
fflush(stdout);
#
^
#
p3scan.c:161:13: error: 'stdout' undeclared (first use in this function)
#
fflush(stdout);
#
^
#
p3scan.c:162:6: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr,
#
^
#
p3scan.c:162:14: error: 'stderr' undeclared (first use in this function)
#
fprintf(stderr,
#
^
#
parsefile.c: In function 'paramlist_set':
#
p3scan.c:174:7: warning: implicit declaration of function 'getpid' [-Wimplicit-function-declaration]
#
config->syslogname, getpid(),
#
^
#
parsefile.c:110:27: error: 'NULL' undeclared (first use in this function)
#
struct paramlist *last=NULL;
#
^
#
p3scan.c:181:15: error: 'LOG_EMERG' undeclared (first use in this function)
#
if (level==LOG_EMERG){
#
^
#
p3scan.c:181:13: warning: comparison between pointer and integer [enabled by default]
#
if (level==LOG_EMERG){
#
^
#
parsefile.c:112:4: warning: implicit declaration of function 'strcasecmp' [-Wimplicit-function-declaration]
#
while (p && (p->name) && (strcasecmp(p->name, name))){
#
^
#
p3scan.c:182:6: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, "ERR: Exiting now...\n");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:183:6: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s\n", puffer);
#
^
#
p3scan.c:184:6: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
#
if (strlen(NONULL(config->emergency))){
#
^
#
p3scan.c:184:10: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
if (strlen(NONULL(config->emergency))){
#
^
#
parsefile.c:121:17: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]
#
if (p->name) free(p->name);
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:184:17: note: in expansion of macro 'NONULL'
#
if (strlen(NONULL(config->emergency))){
#
^
#
parsefile.c:125:4: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
#
p->name=strdup(name);
#
^
#
parsefile.c:125:12: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
#
p->name=strdup(name);
#
^
#
p3scan.c:185:9: warning: implicit declaration of function 'snprintf' [-Wimplicit-function-declaration]
#
snprintf(puffer,4096,"echo '%s' | %s -s 'P3Scan Terminating!' %s", config->emergency, config->mail, config->emergcon);
#
^
#
p3scan.c:185:9: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
parsefile.c: In function 'paramlist_get':
#
parsefile.c:131:22: error: 'NULL' undeclared (first use in this function)
#
if (!name) return NULL;
#
^
#
p3scan.c:186:9: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"echo '%s' | %s -s 'P3Scan Terminating!' %s", config->emergency, config->mail, config->emergcon);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:187:9: warning: implicit declaration of function 'system' [-Wimplicit-function-declaration]
#
if (system(puffer)) fprintf(stderr,"ERR: Calling do_log!");
#
^
#
p3scan.c:190:6: warning: implicit declaration of function 'open' [-Wimplicit-function-declaration]
#
if ((abortfd=open(ABORTFILE, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) >= 0) close(abortfd);
#
^
#
parsefile.c: In function 'paramlist_strreplace':
#
p3scan.c:190:35: error: 'O_WRONLY' undeclared (first use in this function)
#
if ((abortfd=open(ABORTFILE, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) >= 0) close(abortfd);
#
^
#
parsefile.c:154:36: error: 'NULL' undeclared (first use in this function)
#
struct replacelist * rl_first = NULL, * rl = NULL, * rl_last, *rl_next;
#
^
#
p3scan.c:190:46: error: 'O_CREAT' undeclared (first use in this function)
#
if ((abortfd=open(ABORTFILE, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) >= 0) close(abortfd);
#
^
#
p3scan.c:190:44: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
if ((abortfd=open(ABORTFILE, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) >= 0) close(abortfd);
#
^
#
p3scan.c:190:56: error: 'O_TRUNC' undeclared (first use in this function)
#
if ((abortfd=open(ABORTFILE, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) >= 0) close(abortfd);
#
^
#
parsefile.c:162:4: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
#
len=strlen(in);
#
^
#
p3scan.c:190:54: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
if ((abortfd=open(ABORTFILE, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) >= 0) close(abortfd);
#
^
#
p3scan.c:190:65: error: 'S_IRUSR' undeclared (first use in this function)
#
if ((abortfd=open(ABORTFILE, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) >= 0) close(abortfd);
#
^
#
parsefile.c:162:8: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
len=strlen(in);
#
^
#
p3scan.c:190:75: error: 'S_IWUSR' undeclared (first use in this function)
#
if ((abortfd=open(ABORTFILE, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) >= 0) close(abortfd);
#
^
#
p3scan.c:190:73: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
if ((abortfd=open(ABORTFILE, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) >= 0) close(abortfd);
#
^
#
parsefile.c:169:10: warning: implicit declaration of function 'strstr' [-Wimplicit-function-declaration]
#
while ((occ=strstr(in_inc, p->name))!=NULL){
#
^
#
p3scan.c:191:6: warning: implicit declaration of function 'va_end' [-Wimplicit-function-declaration]
#
va_end(az);
#
^
#
parsefile.c:169:22: warning: incompatible implicit declaration of built-in function 'strstr' [enabled by default]
#
while ((occ=strstr(in_inc, p->name))!=NULL){
#
^
#
p3scan.c:195:6: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
#
exit(1);
#
^
#
p3scan.c: At top level:
#
p3scan.c:205:17: error: unknown type name 'size_t'
#
void * w_malloc(size_t bytes) {
#
^
#
parsefile.c:181:16: warning: incompatible implicit declaration of built-in function 'malloc' [enabled by default]
#
rl=malloc(sizeof(struct replacelist));
#
^
#
p3scan.c: In function 'w_free':
#
p3scan.c:237:23: warning: initialization from incompatible pointer type [enabled by default]
#
memory_list *temp = NULL,*found = NULL; // Temporary pointers for list manipulation
#
^
#
p3scan.c:237:37: warning: initialization from incompatible pointer type [enabled by default]
#
memory_list *temp = NULL,*found = NULL; // Temporary pointers for list manipulation
#
^
#
parsefile.c:194:13: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
#
memset(occ, 1, strlen(p->name));
#
^
#
parsefile.c:194:13: warning: incompatible implicit declaration of built-in function 'memset' [enabled by default]
#
p3scan.c:242:33: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
for(temp=memory_list_head;temp!=NULL;temp = temp->next) { // Walk the memory list looking for an item
#
^
#
make: *** [Makefile:83: getlinep3.o] Error 1
#
parsefile.c:203:12: warning: incompatible implicit declaration of built-in function 'malloc' [enabled by default]
#
*dst=malloc(len+1);
#
^
#
p3scan.c:250:12: error: 'LOG_CRIT' undeclared (first use in this function)
#
do_log(LOG_CRIT,"ERR: Unable to free memory not previously allocated: %s",loc); // Report this as an error
#
^
#
p3scan.c:250:5: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT,"ERR: Unable to free memory not previously allocated: %s",loc); // Report this as an error
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
parsefile.c:212:10: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
#
memcpy(&(*dst)[pos], &in[lastreplacepos], l);
#
^
#
parsefile.c:212:10: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
#
p3scan.c:255:3: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
#
free(f_address); // Actually free the data
#
^
#
p3scan.c:255:3: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]
#
p3scan.c: In function 'w_free_all':
#
parsefile.c:223:26: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
#
if ((l=len-pos)>0) memcpy(&(*dst)[pos], &in[lastreplacepos], len-pos);
#
^
#
p3scan.c:268:23: warning: initialization from incompatible pointer type [enabled by default]
#
memory_list *temp = NULL;
#
^
#
p3scan.c:271:5: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]
#
free(memory_list_head->address);
#
^
#
p3scan.c: In function 'w_memory_init':
#
parsefile.c:229:7: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]
#
free(rl_last);
#
^
#
p3scan.c:285:20: warning: assignment from incompatible pointer type [enabled by default]
#
memory_list_head = NULL; // Set the head of the memory list to NULL (no items)
#
^
#
p3scan.c:287:3: warning: implicit declaration of function 'atexit' [-Wimplicit-function-declaration]
#
atexit(w_free_all); // Register to have w_free_all() called at normal termination
#
^
#
parsefile.c: In function 'parsefile':
#
p3scan.c: In function 'stristr':
#
p3scan.c:299:5: warning: implicit declaration of function 'toupper' [-Wimplicit-function-declaration]
#
for ( ; ((*start!=NUL) && (toupper(*start) != toupper(*pattern))); start++);
#
^
#
parsefile.c:238:4: warning: implicit declaration of function 'open' [-Wimplicit-function-declaration]
#
if ( (in=open(infile, O_RDONLY))<0) return -1;
#
^
#
p3scan.c:300:24: warning: return from incompatible pointer type [enabled by default]
#
if (NUL == *start) return NULL;
#
^
#
parsefile.c:238:26: error: 'O_RDONLY' undeclared (first use in this function)
#
if ( (in=open(infile, O_RDONLY))<0) return -1;
#
^
#
p3scan.c:310:3: warning: return from incompatible pointer type [enabled by default]
#
return NULL;
#
^
#
p3scan.c: At top level:
#
parsefile.c:242:7: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]
#
close(in);
#
^
#
p3scan.c:313:39: error: unknown type name 'size_t'
#
char *substr(char *string, int start, size_t count) {
#
^
#
p3scan.c: In function 'p3_mkstemp':
#
p3scan.c:336:4: error: unknown type name 'size_t'
#
size_t len;
#
^
#
parsefile.c:247:28: error: 'O_WRONLY' undeclared (first use in this function)
#
if ( (out=open(outfile, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR ))<0) return 1;
#
^
#
p3scan.c:338:4: error: unknown type name 'uint64_t'
#
static uint64_t value;
#
^
#
parsefile.c:247:39: error: 'O_CREAT' undeclared (first use in this function)
#
if ( (out=open(outfile, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR ))<0) return 1;
#
^
#
p3scan.c:339:4: error: unknown type name 'uint64_t'
#
uint64_t random_time_bits;
#
^
#
parsefile.c:247:49: error: 'O_TRUNC' undeclared (first use in this function)
#
if ( (out=open(outfile, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR ))<0) return 1;
#
^
#
p3scan.c:344:21: error: 'errno' undeclared (first use in this function)
#
int save_errno = errno;
#
^
#
p3scan.c:344:21: warning: initialization makes integer from pointer without a cast [enabled by default]
#
parsefile.c:247:59: error: 'S_IRUSR' undeclared (first use in this function)
#
if ( (out=open(outfile, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR ))<0) return 1;
#
^
#
p3scan.c:346:10: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
len = strlen(template);
#
^
#
parsefile.c:247:69: error: 'S_IWUSR' undeclared (first use in this function)
#
if ( (out=open(outfile, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR ))<0) return 1;
#
^
#
p3scan.c:347:4: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
#
if (len < 6 || strcmp(&template[len - 6], "XXXXXX")) {
#
^
#
p3scan.c:348:15: error: 'EINVAL' undeclared (first use in this function)
#
errno = EINVAL;
#
^
#
p3scan.c:348:7: warning: statement with no effect [-Wunused-value]
#
errno = EINVAL;
#
^
#
parsefile.c: In function 'parsefds':
#
parsefile.c:258:32: error: 'NULL' undeclared (first use in this function)
#
if ((l=linebuf_init(4096))==NULL) return 1;
#
^
#
p3scan.c:356:7: error: unknown type name 'uint64_t'
#
uint64_t v = value;
#
^
#
p3scan.c:369:25: error: 'O_RDWR' undeclared (first use in this function)
#
fd=open(template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | O_SYNC, 0600);
#
^
#
p3scan.c:369:34: error: 'O_CREAT' undeclared (first use in this function)
#
fd=open(template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | O_SYNC, 0600);
#
^
#
parsefile.c:265:30: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]
#
if (replacements>0) free(replaced);
#
^
#
p3scan.c:369:32: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
fd=open(template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | O_SYNC, 0600);
#
^
#
p3scan.c:369:44: error: 'O_EXCL' undeclared (first use in this function)
#
fd=open(template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | O_SYNC, 0600);
#
^
#
p3scan.c:369:42: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
fd=open(template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | O_SYNC, 0600);
#
^
#
p3scan.c:369:52: error: 'S_IRUSR' undeclared (first use in this function)
#
fd=open(template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | O_SYNC, 0600);
#
^
#
p3scan.c:369:62: error: 'S_IWUSR' undeclared (first use in this function)
#
fd=open(template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | O_SYNC, 0600);
#
^
#
p3scan.c:369:60: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
fd=open(template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | O_SYNC, 0600);
#
^
#
p3scan.c:369:72: error: 'O_SYNC' undeclared (first use in this function)
#
fd=open(template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | O_SYNC, 0600);
#
^
#
p3scan.c:369:70: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
fd=open(template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | O_SYNC, 0600);
#
^
#
p3scan.c:371:10: warning: statement with no effect [-Wunused-value]
#
errno = save_errno;
#
^
#
p3scan.c:373:27: error: 'EEXIST' undeclared (first use in this function)
#
} else if (errno != EEXIST) return -1;
#
^
#
p3scan.c:376:4: warning: statement with no effect [-Wunused-value]
#
errno = EEXIST;
#
^
#
p3scan.c: At top level:
#
p3scan.c:380:16: error: unknown type name 'size_t'
#
char *stralloc(size_t length){
#
^
#
p3scan.c:398:27: error: unknown type name 'size_t'
#
char *right(char *string, size_t i){
#
^
#
p3scan.c: In function 'strreplace':
#
p3scan.c:409:4: error: unknown type name 'size_t'
#
size_t size=strlen(haystack)-strlen(needle)+strlen(rstr)+1;
#
^
#
p3scan.c:409:16: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
size_t size=strlen(haystack)-strlen(needle)+strlen(rstr)+1;
#
^
#
p3scan.c:410:4: warning: implicit declaration of function 'w_malloc' [-Wimplicit-function-declaration]
#
char *p=w_malloc(size * sizeof(char));
#
^
#
p3scan.c:410:12: warning: initialization makes pointer from integer without a cast [enabled by default]
#
char *p=w_malloc(size * sizeof(char));
#
^
#
p3scan.c: In function 'make_message':
#
parsefile.c: In function 'paramlist_get':
#
p3scan.c:449:4: error: unknown type name 'va_list'
#
va_list ap;
#
^
#
p3scan.c:450:4: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
#
if ((msg = malloc (size)) == NULL) return NULL;
#
^
#
parsefile.c:137:1: warning: control reaches end of non-void function [-Wreturn-type]
#
}
#
^
#
p3scan.c:450:15: warning: incompatible implicit declaration of built-in function 'malloc' [enabled by default]
#
if ((msg = malloc (size)) == NULL) return NULL;
#
^
#
p3scan.c:450:30: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((msg = malloc (size)) == NULL) return NULL;
#
^
#
p3scan.c:450:39: warning: return from incompatible pointer type [enabled by default]
#
if ((msg = malloc (size)) == NULL) return NULL;
#
^
#
p3scan.c:461:7: warning: implicit declaration of function 'realloc' [-Wimplicit-function-declaration]
#
if ((msg = realloc (msg, size)) == NULL) return NULL;
#
^
#
p3scan.c:461:18: warning: incompatible implicit declaration of built-in function 'realloc' [enabled by default]
#
if ((msg = realloc (msg, size)) == NULL) return NULL;
#
^
#
p3scan.c:461:39: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((msg = realloc (msg, size)) == NULL) return NULL;
#
^
#
p3scan.c:461:48: warning: return from incompatible pointer type [enabled by default]
#
if ((msg = realloc (msg, size)) == NULL) return NULL;
#
^
#
p3scan.c: In function 'scan_directory':
#
p3scan.c:467:4: error: unknown type name 'DIR'
#
DIR *dp;
#
^
#
p3scan.c:469:16: error: storage size of 's' isn't known
#
struct stat s;
#
^
#
p3scan.c:478:15: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
maildirlen=strlen(p->maildir);
#
^
#
p3scan.c:479:4: warning: implicit declaration of function 'stat' [-Wimplicit-function-declaration]
#
if (stat (p->maildir, &s) == -1){
#
^
#
p3scan.c:482:14: error: 'LOG_EMERG' undeclared (first use in this function)
#
do_log(LOG_EMERG, "ERR: %s does not exist", p->maildir);
#
^
#
p3scan.c:482:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: %s does not exist", p->maildir);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:485:4: warning: implicit declaration of function 'S_ISDIR' [-Wimplicit-function-declaration]
#
if (!S_ISDIR(s.st_mode)){
#
^
#
p3scan.c:485:18: error: request for member 'st_mode' in something not a structure or union
#
if (!S_ISDIR(s.st_mode)){
#
^
#
p3scan.c:488:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: %s is not a directory", p->maildir);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:491:4: warning: implicit declaration of function 'opendir' [-Wimplicit-function-declaration]
#
if ((dp = opendir (p->maildir)) == NULL){
#
^
#
p3scan.c:491:12: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((dp = opendir (p->maildir)) == NULL){
#
^
#
p3scan.c:491:36: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((dp = opendir (p->maildir)) == NULL){
#
^
#
p3scan.c:494:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't open directory %s", p->maildir);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:497:6: warning: assignment makes pointer from integer without a cast [enabled by default]
#
vi=w_malloc(VISIZE);
#
^
#
p3scan.c:500:4: warning: implicit declaration of function 'readdir' [-Wimplicit-function-declaration]
#
while ((de = readdir (dp)) != NULL){
#
^
#
p3scan.c:500:15: warning: assignment makes pointer from integer without a cast [enabled by default]
#
while ((de = readdir (dp)) != NULL){
#
^
#
p3scan.c:500:31: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
while ((de = readdir (dp)) != NULL){
#
^
#
p3scan.c:501:21: error: dereferencing pointer to incomplete type
#
if (strcmp (de->d_name, ".") == 0) continue;
#
^
#
make: *** [Makefile:83: parsefile.o] Error 1
#
p3scan.c:501:21: error: request for member 'd_name' in something not a structure or union
#
p3scan.c:502:21: error: dereferencing pointer to incomplete type
#
if (strcmp (de->d_name, "..") == 0) continue;
#
^
#
p3scan.c:502:21: error: request for member 'd_name' in something not a structure or union
#
p3scan.c:503:43: error: dereferencing pointer to incomplete type
#
file=w_malloc(maildirlen + strlen(de->d_name) +2);
#
^
#
p3scan.c:503:43: error: request for member 'd_name' in something not a structure or union
#
p3scan.c:503:7: warning: passing argument 1 of 'strlen' from incompatible pointer type [enabled by default]
#
file=w_malloc(maildirlen + strlen(de->d_name) +2);
#
^
#
p3scan.c:503:7: note: expected 'const char *' but argument is of type 'struct scanner_t **'
#
p3scan.c:503:11: warning: assignment makes pointer from integer without a cast [enabled by default]
#
file=w_malloc(maildirlen + strlen(de->d_name) +2);
#
^
#
p3scan.c:504:7: warning: implicit declaration of function 'sprintf' [-Wimplicit-function-declaration]
#
sprintf(file, "%s/%s", p->maildir, de->d_name);
#
^
#
p3scan.c:504:7: warning: incompatible implicit declaration of built-in function 'sprintf' [enabled by default]
#
p3scan.c:504:44: error: dereferencing pointer to incomplete type
#
sprintf(file, "%s/%s", p->maildir, de->d_name);
#
^
#
p3scan.c:504:44: error: request for member 'd_name' in something not a structure or union
#
p3scan.c:504:7: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'struct scanner_t **' [-Wformat=]
#
sprintf(file, "%s/%s", p->maildir, de->d_name);
#
^
#
p3scan.c:505:7: warning: implicit declaration of function 'lstat' [-Wimplicit-function-declaration]
#
if (lstat (file, &s) == -1){
#
^
#
p3scan.c:509:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't get file info for %s - I won't touch it.", file);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:512:7: warning: implicit declaration of function 'S_ISREG' [-Wimplicit-function-declaration]
#
if (!S_ISREG(s.st_mode)){
#
^
#
p3scan.c:512:21: error: request for member 'st_mode' in something not a structure or union
#
if (!S_ISREG(s.st_mode)){
#
^
#
p3scan.c:515:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: %s is not a regular file. I won't touch it.", file);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:520:14: error: 'LOG_DEBUG' undeclared (first use in this function)
#
do_log(LOG_DEBUG, "Going to scan '%s'", file);
#
^
#
p3scan.c:520:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Going to scan '%s'", file);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:523:14: warning: assignment from incompatible pointer type [enabled by default]
#
virname=NULL;
#
^
#
p3scan.c:529:13: warning: implicit declaration of function 'strcat' [-Wimplicit-function-declaration]
#
strcat(&vi[vipos], virname);
#
^
#
p3scan.c:529:13: warning: incompatible implicit declaration of built-in function 'strcat' [enabled by default]
#
p3scan.c:535:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Finished scanning '%s'(%s=%s)", file,(virname ? virname : "none"),(ret_all==SCANNER_RET_OK ? "OK" : (ret_all==SCANNER_RET_VIRUS ? "VIRUS" : "ERROR")));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:539:4: warning: implicit declaration of function 'closedir' [-Wimplicit-function-declaration]
#
closedir (dp);
#
^
#
p3scan.c:543:21: warning: assignment from incompatible pointer type [enabled by default]
#
} else p->virinfo=NULL;
#
^
#
p3scan.c:469:16: warning: unused variable 's' [-Wunused-variable]
#
struct stat s;
#
^
#
p3scan.c: At top level:
#
p3scan.c:562:27: error: unknown type name 'pid_t'
#
int clean_child_directory(pid_t childpid){
#
^
#
p3scan.c: In function 'checktimeout':
#
p3scan.c:614:23: error: 'LOG_DEBUG' undeclared (first use in this function)
#
do_log(LOG_DEBUG, "Timeout: Sent client a line: %s", p->hdrbuf->line);
#
^
#
p3scan.c:614:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Timeout: Sent client a line: %s", p->hdrbuf->line);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:621:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Timeout: Sent client a bogus line.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:625:13: warning: implicit declaration of function 'read' [-Wimplicit-function-declaration]
#
if (!p->gobogus) readerr=read(p->header_fd,p->cbuff,1);
#
^
#
p3scan.c:629:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Timeout: Sent client a character: %s",p->cbuff);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:638:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Timeout: Sent client a character: %s",svrout);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:656:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Sending server a NOOP...");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:657:10: warning: implicit declaration of function 'writeline_ssl' [-Wimplicit-function-declaration]
#
if (p->usessl) senterr=writeline_ssl(p->ssl, WRITELINE_LEADING_RN, SVRCMD);
#
^
#
p3scan.c:662:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Reseting time...");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c: In function 'checkbuff':
#
p3scan.c:669:4: error: unknown type name 'fd_set'
#
fd_set rfds;
#
^
#
p3scan.c:670:19: error: storage size of 'tv' isn't known
#
struct timeval tv;
#
^
#
p3scan.c:673:4: warning: implicit declaration of function 'FD_ZERO' [-Wimplicit-function-declaration]
#
FD_ZERO(&rfds);
#
^
#
p3scan.c:674:4: warning: implicit declaration of function 'FD_SET' [-Wimplicit-function-declaration]
#
FD_SET(fdc, &rfds);
#
^
#
p3scan.c:675:6: error: request for member 'tv_sec' in something not a structure or union
#
tv.tv_sec = 0;
#
^
#
p3scan.c:675:4: warning: statement with no effect [-Wunused-value]
#
tv.tv_sec = 0;
#
^
#
p3scan.c:676:6: error: request for member 'tv_usec' in something not a structure or union
#
tv.tv_usec = 10000;
#
^
#
p3scan.c:676:4: warning: statement with no effect [-Wunused-value]
#
tv.tv_usec = 10000;
#
^
#
p3scan.c:678:4: warning: implicit declaration of function 'select' [-Wimplicit-function-declaration]
#
retval = select(fdc2, &rfds, NULL, NULL, &tv);
#
^
#
p3scan.c:670:19: warning: unused variable 'tv' [-Wunused-variable]
#
struct timeval tv;
#
^
#
p3scan.c: In function 'scan_mailfile':
#
p3scan.c:687:4: error: unknown type name 'DIR'
#
DIR *dp;
#
^
#
p3scan.c:700:4: error: unknown type name 'FILE'
#
FILE * scanner;
#
^
#
p3scan.c:702:19: error: storage size of 'fs' isn't known
#
struct statvfs fs;
#
^
#
p3scan.c:709:11: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
len=strlen(config->virusdir)+strlen(ALTMSG);
#
^
#
p3scan.c:710:7: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
snprintf(p->vnmsg, len, "%s%s", config->virusdir,ALTMSG);
#
^
#
p3scan.c:713:7: warning: implicit declaration of function 'popen' [-Wimplicit-function-declaration]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:713:19: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:713:39: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:715:16: error: 'LOG_ALERT' undeclared (first use in this function)
#
do_log(LOG_ALERT, "ERR: Can't '%s' !!!", spmcmd);
#
^
#
p3scan.c:715:9: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_ALERT, "ERR: Can't '%s' !!!", spmcmd);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:723:4: warning: implicit declaration of function 'statvfs' [-Wimplicit-function-declaration]
#
if ( statvfs( config->virusdir, &fs ) == SCANNER_RET_ERR){
#
^
#
p3scan.c:727:14: error: 'LOG_EMERG' undeclared (first use in this function)
#
do_log(LOG_EMERG, "ERR: Unable to get available space!");
#
^
#
p3scan.c:727:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Unable to get available space!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:730:10: error: request for member 'f_bsize' in something not a structure or union
#
if (fs.f_bsize==1024) kbfree=fs.f_bavail;
#
^
#
p3scan.c:730:18: warning: comparison between pointer and integer [enabled by default]
#
if (fs.f_bsize==1024) kbfree=fs.f_bavail;
#
^
#
p3scan.c:730:35: error: request for member 'f_bavail' in something not a structure or union
#
if (fs.f_bsize==1024) kbfree=fs.f_bavail;
#
^
#
p3scan.c:730:32: warning: assignment makes integer from pointer without a cast [enabled by default]
#
if (fs.f_bsize==1024) kbfree=fs.f_bavail;
#
^
#
p3scan.c:731:18: error: request for member 'f_bsize' in something not a structure or union
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:731:32: error: request for member 'f_bavail' in something not a structure or union
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:731:42: error: invalid operands to binary / (have 'struct scanner_t **' and 'int')
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:731:27: error: invalid operands to binary * (have 'struct scanner_t **' and 'struct scanner_t **')
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:731:54: error: request for member 'f_bavail' in something not a structure or union
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:731:63: error: invalid operands to binary % (have 'struct scanner_t **' and 'int')
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:731:73: error: request for member 'f_bsize' in something not a structure or union
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:731:69: error: invalid operands to binary * (have 'struct scanner_t **' and 'struct scanner_t **')
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:731:82: error: invalid operands to binary / (have 'struct scanner_t **' and 'int')
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:731:50: error: invalid operands to binary + (have 'struct scanner_t **' and 'struct scanner_t **')
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:731:15: warning: assignment makes integer from pointer without a cast [enabled by default]
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:735:14: error: 'LOG_CRIT' undeclared (first use in this function)
#
do_log(LOG_CRIT, "ERR: Not enough space! Available space: %lu", kbfree);
#
^
#
p3scan.c:735:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Not enough space! Available space: %lu", kbfree);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:739:26: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if (config->renattach != NULL && !p->cksmtp){
#
^
#
p3scan.c:743:11: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
len=strlen(config->virusdir)+strlen(NEWMSG);
#
^
#
p3scan.c:744:7: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
snprintf(newmsg, len, "%s%s", config->virusdir,NEWMSG);
#
^
#
p3scan.c:745:31: error: 'O_WRONLY' undeclared (first use in this function)
#
if ((spamfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:745:42: error: 'O_CREAT' undeclared (first use in this function)
#
if ((spamfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:745:40: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
if ((spamfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:745:52: error: 'O_TRUNC' undeclared (first use in this function)
#
if ((spamfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:745:50: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
if ((spamfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:745:62: error: 'S_IRUSR' undeclared (first use in this function)
#
if ((spamfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:745:72: error: 'S_IWUSR' undeclared (first use in this function)
#
if ((spamfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:745:70: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
if ((spamfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:747:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_ALERT, "ERR: Can't create newmsg!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:752:19: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:752:39: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:754:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_ALERT, "ERR: Can't start renattach '%s' !!!", spmcmd);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:758:7: warning: implicit declaration of function 'fileno' [-Wimplicit-function-declaration]
#
fdc=fileno(scanner);
#
^
#
p3scan.c:767:7: warning: implicit declaration of function 'fgets' [-Wimplicit-function-declaration]
#
while ((fgets(line, 4095, scanner))!=NULL){
#
^
#
p3scan.c:767:42: warning: comparison between pointer and integer [enabled by default]
#
while ((fgets(line, 4095, scanner))!=NULL){
#
^
#
p3scan.c:780:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't close newmsg: %s", newmsg);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:783:7: warning: implicit declaration of function 'pclose' [-Wimplicit-function-declaration]
#
ret=pclose(scanner);
#
^
#
p3scan.c:786:19: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:786:39: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:787:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_ALERT, "ERR: Can't '%s' !!!", spmcmd);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:797:14: warning: assignment from incompatible pointer type [enabled by default]
#
p->virinfo=NULL;
#
^
#
p3scan.c:801:14: error: 'LOG_DEBUG' undeclared (first use in this function)
#
do_log(LOG_DEBUG, "DeMIMEing to %s", p->maildir);
#
^
#
p3scan.c:801:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "DeMIMEing to %s", p->maildir);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:802:7: warning: implicit declaration of function 'mkdir' [-Wimplicit-function-declaration]
#
viret = mkdir(p->maildir, S_IRWXU);
#
^
#
p3scan.c:802:33: error: 'S_IRWXU' undeclared (first use in this function)
#
viret = mkdir(p->maildir, S_IRWXU);
#
^
#
p3scan.c:803:27: error: 'errno' undeclared (first use in this function)
#
if ((viret == -1)&&(errno != EEXIST)){
#
^
#
p3scan.c:803:36: error: 'EEXIST' undeclared (first use in this function)
#
if ((viret == -1)&&(errno != EEXIST)){
#
^
#
p3scan.c:805:10: warning: implicit declaration of function 'strerror' [-Wimplicit-function-declaration]
#
p->maildir, strerror(errno));
#
^
#
p3scan.c:805:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:820:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Invoking scanner");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:821:20: warning: assignment from incompatible pointer type [enabled by default]
#
p->virinfo=NULL;
#
^
#
p3scan.c:828:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Scanner returned %i", viret);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:830:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Unlinking deMIMEd files", p->maildir);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:831:18: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
maildirlen=strlen(p->maildir);
#
^
#
p3scan.c:832:15: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((dp = opendir (p->maildir)) == NULL){
#
^
#
p3scan.c:832:39: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((dp = opendir (p->maildir)) == NULL){
#
^
#
p3scan.c:836:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't open directory %s to erase files", p->maildir);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:838:21: warning: assignment makes pointer from integer without a cast [enabled by default]
#
while ((de = readdir (dp)) != NULL){
#
^
#
p3scan.c:838:37: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
while ((de = readdir (dp)) != NULL){
#
^
#
p3scan.c:839:27: error: dereferencing pointer to incomplete type
#
if (strcmp (de->d_name, ".") == 0) continue;
#
^
#
p3scan.c:839:27: error: request for member 'd_name' in something not a structure or union
#
p3scan.c:840:27: error: dereferencing pointer to incomplete type
#
if (strcmp (de->d_name, "..") == 0) continue;
#
^
#
p3scan.c:840:27: error: request for member 'd_name' in something not a structure or union
#
p3scan.c:843:49: error: dereferencing pointer to incomplete type
#
file=w_malloc(maildirlen + strlen(de->d_name) +2);
#
^
#
p3scan.c:843:49: error: request for member 'd_name' in something not a structure or union
#
p3scan.c:843:13: warning: passing argument 1 of 'strlen' from incompatible pointer type [enabled by default]
#
file=w_malloc(maildirlen + strlen(de->d_name) +2);
#
^
#
p3scan.c:843:13: note: expected 'const char *' but argument is of type 'struct scanner_t **'
#
p3scan.c:843:17: warning: assignment makes pointer from integer without a cast [enabled by default]
#
file=w_malloc(maildirlen + strlen(de->d_name) +2);
#
^
#
p3scan.c:844:13: warning: incompatible implicit declaration of built-in function 'sprintf' [enabled by default]
#
sprintf(file, "%s/%s", p->maildir, de->d_name);
#
^
#
p3scan.c:844:50: error: dereferencing pointer to incomplete type
#
sprintf(file, "%s/%s", p->maildir, de->d_name);
#
^
#
p3scan.c:844:50: error: request for member 'd_name' in something not a structure or union
#
p3scan.c:844:13: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'struct scanner_t **' [-Wformat=]
#
sprintf(file, "%s/%s", p->maildir, de->d_name);
#
^
#
p3scan.c:845:13: warning: implicit declaration of function 'unlink' [-Wimplicit-function-declaration]
#
if ((unlink(file)<0)){
#
^
#
p3scan.c:847:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: File Error! Could not erase %s",file);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:852:10: warning: implicit declaration of function 'rmdir' [-Wimplicit-function-declaration]
#
rmdir(p->maildir);
#
^
#
p3scan.c:859:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Invoking scanner");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:860:17: warning: assignment from incompatible pointer type [enabled by default]
#
p->virinfo=NULL;
#
^
#
p3scan.c:862:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Scanner returned %i", viret);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:868:7: warning: implicit declaration of function 'isspace' [-Wimplicit-function-declaration]
#
TRIM(p->virinfo);
#
^
#
p3scan.c:868:7: warning: implicit declaration of function 'memmove' [-Wimplicit-function-declaration]
#
In file included from p3scan.c:75:0:
#
p3scan.h:93:4: warning: incompatible implicit declaration of built-in function 'memmove' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:868:7: note: in expansion of macro 'TRIM'
#
TRIM(p->virinfo);
#
^
#
p3scan.h:93:27: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:868:7: note: in expansion of macro 'TRIM'
#
TRIM(p->virinfo);
#
^
#
p3scan.c:876:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Checking for spam");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:877:11: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
len=strlen(config->virusdir)+strlen(NEWMSG);
#
^
#
p3scan.c:878:7: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
snprintf(newmsg, len, "%s%s", config->virusdir,NEWMSG);
#
^
#
p3scan.c:879:40: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
if ((spamfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:879:50: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
if ((spamfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:879:70: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
if ((spamfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:880:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_ALERT, "ERR: Can't create newmsg!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:885:7: warning: implicit declaration of function 'strstr' [-Wimplicit-function-declaration]
#
if (strstr(config->spamcheck,"dspamuser")!=NULL){
#
^
#
p3scan.c:885:11: warning: incompatible implicit declaration of built-in function 'strstr' [enabled by default]
#
if (strstr(config->spamcheck,"dspamuser")!=NULL){
#
^
#
p3scan.c:885:48: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if (strstr(config->spamcheck,"dspamuser")!=NULL){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:886:21: note: in expansion of macro 'NONULL'
#
if (strlen(NONULL(p->dspamuser))) config->spamcheck=strreplace(config->spamcheck,"dspamuser",p->dspamuser);
#
^
#
p3scan.c:892:19: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:892:39: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:894:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_ALERT, "ERR: Can't start spammer '%s' !!!", spmcmd);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:907:42: warning: comparison between pointer and integer [enabled by default]
#
while ((fgets(line, 4095, scanner))!=NULL){
#
^
#
p3scan.c:917:10: warning: implicit declaration of function 'strncmp' [-Wimplicit-function-declaration]
#
if ((strncmp(line,".",1 ) == 0 && strlen(line) == 1)){
#
^
#
p3scan.c:918:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Not writing '.'");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:920:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Not writing '.'");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:921:104: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
} else if (strncmp(line,"..",2) == 0 && strlen(line) == 2 && strstr(config->spamcheck,"dspam")!=NULL){
#
^
#
p3scan.c:922:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Not writing dspam '..'");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:927:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Writing new .");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:932:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't close newmsg spamfd");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:940:19: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:940:39: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:942:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_ALERT, "ERR: Can't '%s' !!!", spmcmd);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:951:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"HTML Parsing now...");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:955:11: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
len=strlen(config->virusdir)+strlen(NEWMSG);
#
^
#
p3scan.c:956:7: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
snprintf(newmsg, len, "%s%s", config->virusdir,NEWMSG);
#
^
#
p3scan.c:957:40: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
if ((htmlfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:957:50: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
if ((htmlfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:957:70: error: invalid operands to binary | (have 'struct scanner_t **' and 'struct scanner_t **')
#
if ((htmlfd=open(newmsg,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR))<0){
#
^
#
p3scan.c:959:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_ALERT, "ERR: Can't create newmsg!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:963:11: warning: incompatible implicit declaration of built-in function 'strstr' [enabled by default]
#
if (strstr(config->overwrite,"htmluser")!=NULL){
#
^
#
p3scan.c:963:47: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if (strstr(config->overwrite,"htmluser")!=NULL){
#
^
#
p3scan.c:970:19: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:970:39: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:972:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_ALERT, "ERR: Can't start HTML parser '%s' !!!", spmcmd);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:985:42: warning: comparison between pointer and integer [enabled by default]
#
while ((fgets(line, 4095, scanner))!=NULL){
#
^
#
p3scan.c:997:10: warning: incompatible implicit declaration of built-in function 'sprintf' [enabled by default]
#
sprintf(config->emergency,"Can't close newmsg htmlfd");
#
^
#
p3scan.c:998:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't close newmsg htmlfd");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1007:22: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:1007:42: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((scanner=popen(spmcmd, "r"))==NULL){
#
^
#
p3scan.c:1009:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_ALERT, "ERR: Can't '%s' !!!", spmcmd);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1013:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
} else do_log(LOG_ALERT, "ERR: HTML Parser returned error! Ignoring it's output!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1017:8: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
if (strlen(NONULL(p->virinfo))<1){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:1017:15: note: in expansion of macro 'NONULL'
#
if (strlen(NONULL(p->virinfo))<1){
#
^
#
p3scan.c:1019:7: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
#
p->virinfo=strdup(MESSAGE_NOVIRINFO);
#
^
#
p3scan.c:1019:18: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
#
p->virinfo=strdup(MESSAGE_NOVIRINFO);
#
^
#
p3scan.c:702:19: warning: unused variable 'fs' [-Wunused-variable]
#
struct statvfs fs;
#
^
#
p3scan.c: In function 'send_mailfile':
#
p3scan.c:1031:31: error: 'O_RDONLY' undeclared (first use in this function)
#
if ((mailfd=open(mailfile, O_RDONLY ))<0){
#
^
#
p3scan.c:1034:14: error: 'LOG_EMERG' undeclared (first use in this function)
#
do_log(LOG_EMERG, "ERR: Can't open mailfile (%s)!", mailfile);
#
^
#
p3scan.c:1034:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't open mailfile (%s)!", mailfile);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1044:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Could not allocate memory for sending mail!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1057:10: warning: implicit declaration of function 'lseek' [-Wimplicit-function-declaration]
#
lseek(mailfd, p->hdroffset, SEEK_SET);
#
^
#
p3scan.c:1057:38: error: 'SEEK_SET' undeclared (first use in this function)
#
lseek(mailfd, p->hdroffset, SEEK_SET);
#
^
#
p3scan.c:1074:17: error: 'LOG_CRIT' undeclared (first use in this function)
#
do_log(LOG_CRIT, "ERR: Client disappeared during mail send!");
#
^
#
p3scan.c:1074:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Client disappeared during mail send!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1076:17: error: 'EPIPE' undeclared (first use in this function)
#
return EPIPE;
#
^
#
p3scan.c:1076:10: warning: return makes integer from pointer without a cast [enabled by default]
#
return EPIPE;
#
^
#
p3scan.c:1081:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Sending mail to client");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1100:53: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
if ((strncmp(filebuf->line,".",1 ) == 0 && strlen(filebuf->line) == 1)) gotprd=1;
#
^
#
p3scan.c:1133:12: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Client disappeared during mail send!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1135:12: warning: return makes integer from pointer without a cast [enabled by default]
#
return EPIPE;
#
^
#
p3scan.c:1140:12: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Sending mail to client");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1148:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: reading from mailfile %s, error code: %d", mailfile, res);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1153:14: error: 'LOG_DEBUG' undeclared (first use in this function)
#
do_log(LOG_DEBUG, "Wrote new EOM.");
#
^
#
p3scan.c:1153:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Wrote new EOM.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1028:36: warning: variable 'gottxt' set but not used [-Wunused-but-set-variable]
#
int res=0, sendret=0, gotprd=0, gottxt=0, nogo=0;
#
^
#
p3scan.c: In function 'set_defaultparams':
#
p3scan.c:1163:4: error: unknown type name 'FILE'
#
FILE * scanner;
#
^
#
p3scan.c:1168:4: warning: implicit declaration of function 'gethostname' [-Wimplicit-function-declaration]
#
gethostname(buf, 256);
#
^
#
p3scan.c:1170:4: warning: implicit declaration of function 'getdomainname' [-Wimplicit-function-declaration]
#
if(getdomainname(buf, 256)) do_log(LOG_CRIT,"ERR: getdomainname");
#
^
#
p3scan.c:1170:39: error: 'LOG_CRIT' undeclared (first use in this function)
#
if(getdomainname(buf, 256)) do_log(LOG_CRIT,"ERR: getdomainname");
#
^
#
p3scan.c:1170:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(getdomainname(buf, 256)) do_log(LOG_CRIT,"ERR: getdomainname");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1174:4: warning: implicit declaration of function 'inet_ntoa' [-Wimplicit-function-declaration]
#
paramlist_set(p->params, "%CLIENTIP%", inet_ntoa(p->client_addr.sin_addr));
#
^
#
p3scan.c:1174:67: error: request for member 'sin_addr' in something not a structure or union
#
paramlist_set(p->params, "%CLIENTIP%", inet_ntoa(p->client_addr.sin_addr));
#
^
#
p3scan.c:1174:4: warning: passing argument 3 of 'paramlist_set' makes pointer from integer without a cast [enabled by default]
#
paramlist_set(p->params, "%CLIENTIP%", inet_ntoa(p->client_addr.sin_addr));
#
^
#
In file included from p3scan.c:77:0:
#
parsefile.h:87:5: note: expected 'char *' but argument is of type 'int'
#
int paramlist_set(struct paramlist * params, char * name, char * value);
#
^
#
p3scan.c:1175:4: warning: incompatible implicit declaration of built-in function 'sprintf' [enabled by default]
#
sprintf(buf, "%i", ntohs(p->client_addr.sin_port));
#
^
#
p3scan.c:1175:4: warning: implicit declaration of function 'ntohs' [-Wimplicit-function-declaration]
#
p3scan.c:1175:43: error: request for member 'sin_port' in something not a structure or union
#
sprintf(buf, "%i", ntohs(p->client_addr.sin_port));
#
^
#
p3scan.c:1177:67: error: request for member 'sin_addr' in something not a structure or union
#
paramlist_set(p->params, "%SERVERIP%", inet_ntoa(p->server_addr.sin_addr));
#
^
#
p3scan.c:1177:4: warning: passing argument 3 of 'paramlist_set' makes pointer from integer without a cast [enabled by default]
#
paramlist_set(p->params, "%SERVERIP%", inet_ntoa(p->server_addr.sin_addr));
#
^
#
In file included from p3scan.c:77:0:
#
parsefile.h:87:5: note: expected 'char *' but argument is of type 'int'
#
int paramlist_set(struct paramlist * params, char * name, char * value);
#
^
#
p3scan.c:1178:43: error: request for member 'sin_port' in something not a structure or union
#
sprintf(buf, "%i", ntohs(p->server_addr.sin_port));
#
^
#
p3scan.c:1183:21: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if(config->footer!=NULL){
#
^
#
p3scan.c:1184:11: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
len=strlen(config->footer);
#
^
#
p3scan.c:1185:7: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
snprintf(vcmd, len+1, "%s 2>&1", config->footer);
#
^
#
p3scan.c:1186:19: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((scanner=popen(vcmd, "r"))==NULL){
#
^
#
p3scan.c:1186:37: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((scanner=popen(vcmd, "r"))==NULL){
#
^
#
p3scan.c:1187:10: warning: passing argument 3 of 'paramlist_set' from incompatible pointer type [enabled by default]
#
paramlist_set(p->params, "%VDINFO%", NULL);
#
^
#
In file included from p3scan.c:77:0:
#
parsefile.h:87:5: note: expected 'char *' but argument is of type 'struct scanner_t **'
#
int paramlist_set(struct paramlist * params, char * name, char * value);
#
^
#
p3scan.c:1188:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Can't get scanner version '%s' !!!", vcmd);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1190:43: warning: comparison between pointer and integer [enabled by default]
#
while ((fgets(line, 512, scanner))!=NULL){
#
^
#
p3scan.c:1193:27: warning: incompatible implicit declaration of built-in function 'strcat' [enabled by default]
#
if (len > 1) strcat(&virdef[vlen],line);
#
^
#
p3scan.c:1204:4: warning: passing argument 3 of 'paramlist_set' from incompatible pointer type [enabled by default]
#
} else paramlist_set(p->params, "%VDINFO%", NULL);
#
^
#
In file included from p3scan.c:77:0:
#
parsefile.h:87:5: note: expected 'char *' but argument is of type 'struct scanner_t **'
#
int paramlist_set(struct paramlist * params, char * name, char * value);
#
^
#
p3scan.c: In function 'set_maildateparam':
#
p3scan.c:1210:4: error: unknown type name 'time_t'
#
time_t now = time(NULL);
#
^
#
p3scan.c:1211:11: warning: implicit declaration of function 'localtime' [-Wimplicit-function-declaration]
#
struct tm *tm = localtime(&now);
#
^
#
p3scan.c:1211:20: warning: initialization makes pointer from integer without a cast [enabled by default]
#
struct tm *tm = localtime(&now);
#
^
#
p3scan.c:1212:14: error: storage size of 'local' isn't known
#
struct tm local;
#
^
#
p3scan.c:1215:4: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
#
memcpy(&local, tm, sizeof(struct tm));
#
^
#
p3scan.c:1215:4: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
#
p3scan.c:1215:30: error: invalid application of 'sizeof' to incomplete type 'struct tm'
#
memcpy(&local, tm, sizeof(struct tm));
#
^
#
p3scan.c:1215:37: warning: passing argument 3 of 'memcpy' makes integer from pointer without a cast [enabled by default]
#
memcpy(&local, tm, sizeof(struct tm));
#
^
#
p3scan.c:1215:37: note: expected 'unsigned int' but argument is of type 'struct scanner_t **'
#
p3scan.c:1216:4: warning: implicit declaration of function 'gmtime' [-Wimplicit-function-declaration]
#
gmt = gmtime(&now);
#
^
#
p3scan.c:1216:8: warning: assignment makes pointer from integer without a cast [enabled by default]
#
gmt = gmtime(&now);
#
^
#
p3scan.c:1218:24: error: request for member 'tm_hour' in something not a structure or union
#
diff_min = 60*(local.tm_hour - gmt->tm_hour) + local.tm_min - gmt->tm_min;
#
^
#
p3scan.c:1218:38: error: dereferencing pointer to incomplete type
#
diff_min = 60*(local.tm_hour - gmt->tm_hour) + local.tm_min - gmt->tm_min;
#
^
#
p3scan.c:1218:38: error: request for member 'tm_hour' in something not a structure or union
#
p3scan.c:1218:56: error: request for member 'tm_min' in something not a structure or union
#
diff_min = 60*(local.tm_hour - gmt->tm_hour) + local.tm_min - gmt->tm_min;
#
^
#
p3scan.c:1218:69: error: dereferencing pointer to incomplete type
#
diff_min = 60*(local.tm_hour - gmt->tm_hour) + local.tm_min - gmt->tm_min;
#
^
#
p3scan.c:1218:69: error: request for member 'tm_min' in something not a structure or union
#
p3scan.c:1219:13: error: request for member 'tm_year' in something not a structure or union
#
if (local.tm_year != gmt->tm_year) diff_min += (local.tm_year > gmt->tm_year)? 1440 : -1440;
#
^
#
p3scan.c:1219:28: error: dereferencing pointer to incomplete type
#
if (local.tm_year != gmt->tm_year) diff_min += (local.tm_year > gmt->tm_year)? 1440 : -1440;
#
^
#
p3scan.c:1219:28: error: request for member 'tm_year' in something not a structure or union
#
p3scan.c:1219:57: error: request for member 'tm_year' in something not a structure or union
#
if (local.tm_year != gmt->tm_year) diff_min += (local.tm_year > gmt->tm_year)? 1440 : -1440;
#
^
#
p3scan.c:1219:71: error: dereferencing pointer to incomplete type
#
if (local.tm_year != gmt->tm_year) diff_min += (local.tm_year > gmt->tm_year)? 1440 : -1440;
#
^
#
p3scan.c:1219:71: error: request for member 'tm_year' in something not a structure or union
#
p3scan.c:1220:18: error: request for member 'tm_yday' in something not a structure or union
#
else if (local.tm_yday != gmt->tm_yday)
#
^
#
p3scan.c:1220:33: error: dereferencing pointer to incomplete type
#
else if (local.tm_yday != gmt->tm_yday)
#
^
#
p3scan.c:1220:33: error: request for member 'tm_yday' in something not a structure or union
#
p3scan.c:1221:22: error: request for member 'tm_yday' in something not a structure or union
#
diff_min += (local.tm_yday > gmt->tm_yday)? 1440 : -1440;
#
^
#
p3scan.c:1221:36: error: dereferencing pointer to incomplete type
#
diff_min += (local.tm_yday > gmt->tm_yday)? 1440 : -1440;
#
^
#
p3scan.c:1221:36: error: request for member 'tm_yday' in something not a structure or union
#
p3scan.c:1223:4: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
#
diff_min = abs(diff_min - diff_hour*60);
#
^
#
p3scan.c:1224:4: warning: implicit declaration of function 'strftime' [-Wimplicit-function-declaration]
#
len = strftime(buf, sizeof(buf), "%a, ", &local);
#
^
#
p3scan.c:1224:10: warning: incompatible implicit declaration of built-in function 'strftime' [enabled by default]
#
len = strftime(buf, sizeof(buf), "%a, ", &local);
#
^
#
p3scan.c:1225:11: warning: incompatible implicit declaration of built-in function 'sprintf' [enabled by default]
#
(void) sprintf(buf + len, "%02d ", local.tm_mday);
#
^
#
p3scan.c:1225:44: error: request for member 'tm_mday' in something not a structure or union
#
(void) sprintf(buf + len, "%02d ", local.tm_mday);
#
^
#
p3scan.c:1225:4: warning: format '%d' expects argument of type 'int', but argument 3 has type 'struct scanner_t **' [-Wformat=]
#
(void) sprintf(buf + len, "%02d ", local.tm_mday);
#
^
#
p3scan.c:1226:11: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
len += strlen(buf + len);
#
^
#
p3scan.c:1212:14: warning: unused variable 'local' [-Wunused-variable]
#
struct tm local;
#
^
#
p3scan.c: In function 'set_paramsfrommailheader':
#
p3scan.c:1236:27: error: 'O_RDONLY' undeclared (first use in this function)
#
if ((fd=open(mailfile, O_RDONLY ))<0) return;
#
^
#
p3scan.c:1240:10: warning: implicit declaration of function 'strncasecmp' [-Wimplicit-function-declaration]
#
if (!strncasecmp(lb->line, "from: ", 6)){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:93:4: warning: incompatible implicit declaration of built-in function 'memmove' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:1242:13: note: in expansion of macro 'TRIM'
#
TRIM(c);
#
^
#
p3scan.h:93:27: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:1242:13: note: in expansion of macro 'TRIM'
#
TRIM(c);
#
^
#
p3scan.h:93:4: warning: incompatible implicit declaration of built-in function 'memmove' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:1246:13: note: in expansion of macro 'TRIM'
#
TRIM(c);
#
^
#
p3scan.h:93:27: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:1246:13: note: in expansion of macro 'TRIM'
#
TRIM(c);
#
^
#
p3scan.h:93:4: warning: incompatible implicit declaration of built-in function 'memmove' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:1250:13: note: in expansion of macro 'TRIM'
#
TRIM(c);
#
^
#
p3scan.h:93:27: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:1250:13: note: in expansion of macro 'TRIM'
#
TRIM(c);
#
^
#
p3scan.h:93:4: warning: incompatible implicit declaration of built-in function 'memmove' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:1255:16: note: in expansion of macro 'TRIM'
#
TRIM(c);
#
^
#
p3scan.h:93:27: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:1255:16: note: in expansion of macro 'TRIM'
#
TRIM(c);
#
^
#
p3scan.c:1256:16: warning: implicit declaration of function 'substr' [-Wimplicit-function-declaration]
#
c = substr(c,1,(strlen(c)-2));
#
^
#
p3scan.c:1256:32: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
c = substr(c,1,(strlen(c)-2));
#
^
#
p3scan.c:1256:18: warning: assignment makes pointer from integer without a cast [enabled by default]
#
c = substr(c,1,(strlen(c)-2));
#
^
#
p3scan.c: In function 'unset_paramsfrommailheader':
#
p3scan.c:1269:4: warning: passing argument 3 of 'paramlist_set' from incompatible pointer type [enabled by default]
#
paramlist_set(params, "%MAILFROM%", NULL);
#
^
#
In file included from p3scan.c:77:0:
#
parsefile.h:87:5: note: expected 'char *' but argument is of type 'struct scanner_t **'
#
int paramlist_set(struct paramlist * params, char * name, char * value);
#
^
#
p3scan.c:1270:4: warning: passing argument 3 of 'paramlist_set' from incompatible pointer type [enabled by default]
#
paramlist_set(params, "%SUBJECT%", NULL);
#
^
#
In file included from p3scan.c:77:0:
#
parsefile.h:87:5: note: expected 'char *' but argument is of type 'struct scanner_t **'
#
int paramlist_set(struct paramlist * params, char * name, char * value);
#
^
#
p3scan.c:1271:4: warning: passing argument 3 of 'paramlist_set' from incompatible pointer type [enabled by default]
#
paramlist_set(params, "%MAILTO%", NULL);
#
^
#
In file included from p3scan.c:77:0:
#
parsefile.h:87:5: note: expected 'char *' but argument is of type 'struct scanner_t **'
#
int paramlist_set(struct paramlist * params, char * name, char * value);
#
^
#
p3scan.c:1272:4: warning: passing argument 3 of 'paramlist_set' from incompatible pointer type [enabled by default]
#
paramlist_set(params, "%VIRUSNAME%", NULL);
#
^
#
In file included from p3scan.c:77:0:
#
parsefile.h:87:5: note: expected 'char *' but argument is of type 'struct scanner_t **'
#
int paramlist_set(struct paramlist * params, char * name, char * value);
#
^
#
p3scan.c:1273:4: warning: passing argument 3 of 'paramlist_set' from incompatible pointer type [enabled by default]
#
paramlist_set(params, "%MAILFILE%", NULL);
#
^
#
In file included from p3scan.c:77:0:
#
parsefile.h:87:5: note: expected 'char *' but argument is of type 'struct scanner_t **'
#
int paramlist_set(struct paramlist * params, char * name, char * value);
#
^
#
p3scan.c:1274:4: warning: passing argument 3 of 'paramlist_set' from incompatible pointer type [enabled by default]
#
paramlist_set(params, "%P3SCANID%", NULL);
#
^
#
In file included from p3scan.c:77:0:
#
parsefile.h:87:5: note: expected 'char *' but argument is of type 'struct scanner_t **'
#
int paramlist_set(struct paramlist * params, char * name, char * value);
#
^
#
p3scan.c:1275:4: warning: passing argument 3 of 'paramlist_set' from incompatible pointer type [enabled by default]
#
paramlist_set(params, "%VDINFO%", NULL);
#
^
#
In file included from p3scan.c:77:0:
#
parsefile.h:87:5: note: expected 'char *' but argument is of type 'struct scanner_t **'
#
int paramlist_set(struct paramlist * params, char * name, char * value);
#
^
#
p3scan.c: In function 'do_virusaction':
#
p3scan.c:1280:15: warning: initialization from incompatible pointer type [enabled by default]
#
char *mail=NULL, *mailx=NULL;
#
^
#
p3scan.c:1280:28: warning: initialization from incompatible pointer type [enabled by default]
#
char *mail=NULL, *mailx=NULL;
#
^
#
p3scan.c:1289:14: error: 'LOG_WARNING' undeclared (first use in this function)
#
do_log(LOG_WARNING,"554 %s",config->smtprset);
#
^
#
p3scan.c:1289:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_WARNING,"554 %s",config->smtprset);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1306:23: error: 'LOG_EMERG' undeclared (first use in this function)
#
do_log(LOG_EMERG, "ERR: Could not read header file (broken)!");
#
^
#
p3scan.c:1306:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Could not read header file (broken)!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1312:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Could not flush header buffer to client (broken)!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1331:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Could not read header file!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1338:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Could not flush header buffer to client!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1348:20: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
mail = w_malloc(strlen(p->mailfile)+10);
#
^
#
p3scan.c:1348:9: warning: assignment makes pointer from integer without a cast [enabled by default]
#
mail = w_malloc(strlen(p->mailfile)+10);
#
^
#
p3scan.c:1349:28: error: 'O_RDONLY' undeclared (first use in this function)
#
if ((extrafd=open(EXTRA,O_RDONLY))>=0) {
#
^
#
p3scan.c:1353:16: warning: assignment makes pointer from integer without a cast [enabled by default]
#
mailx = w_malloc(strlen(p->mailfile)+10);
#
^
#
p3scan.c:1354:21: error: 'LOG_NOTICE' undeclared (first use in this function)
#
} else do_log(LOG_NOTICE, "ERR: p3scan.extra should not be blank");
#
^
#
p3scan.c:1354:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
} else do_log(LOG_NOTICE, "ERR: p3scan.extra should not be blank");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1360:7: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
snprintf(comm,4096,"%s %s %s",MOVEIT,p->mailfile,config->virusdirbase);
#
^
#
p3scan.c:1361:31: error: 'LOG_CRIT' undeclared (first use in this function)
#
if(system(comm)) do_log(LOG_CRIT,"ERR: move");
#
^
#
p3scan.c:1361:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(system(comm)) do_log(LOG_CRIT,"ERR: move");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1362:7: warning: implicit declaration of function 'sync' [-Wimplicit-function-declaration]
#
sync();
#
^
#
p3scan.c:1364:14: error: 'LOG_DEBUG' undeclared (first use in this function)
#
do_log(LOG_DEBUG,"Forcing all files 0600 %s",comm);
#
^
#
p3scan.c:1364:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"Forcing all files 0600 %s",comm);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1365:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(system(comm)) do_log(LOG_CRIT,"ERR: chmod");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1367:4: warning: incompatible implicit declaration of built-in function 'sprintf' [enabled by default]
#
sprintf(mail, "%s/%i.mailout", config->notifydir,getpid());
#
^
#
p3scan.c:1376:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG,"ERR: Critical error opening file '%s', Program aborted.", p->vnmsg);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1395:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't open extra mail notification template %s",EXTRA);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1398:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't create extra virus warning mail message %s",p->mailfile);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1414:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't open alternate mail notification template %s",p->vnmsg);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1417:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't create virus warning mail message %s",p->mailfile);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1421:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"Sending alternate virus notification: %s",p->vnmsg);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1433:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't open mail notification template %s",config->virustemplate);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1436:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't create virus warning mail message %s",p->mailfile);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1441:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "sending new mail");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1445:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if (config->extra != NULL){
#
^
#
p3scan.c:1447:10: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
snprintf(comm,4096,"cat %s | %s -s '[Virus] found in a mail to %s' %s", mailx, config->mail, paramlist_get(p->params, "%USERNAME%"),config->extra);
#
^
#
p3scan.c:1448:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"cat %s | %s -s '[Virus] found in a mail to %s' %s", mailx, config->mail, paramlist_get(p->params, "%USERNAME%"),config->extra);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1449:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(system(comm)) do_log(LOG_CRIT,"ERR: mailx");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1450:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"Sent p3scan.extra message to %s",config->extra);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1452:10: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
snprintf(comm,4096,"cat %s | %s -s '[Virus] found in a mail to %s' %s", mail, config->mail, paramlist_get(p->params, "%USERNAME%"),config->extra);
#
^
#
p3scan.c:1453:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"cat %s | %s -s '[Virus] found in a mail to %s' %s", mail, config->mail, paramlist_get(p->params, "%USERNAME%"),config->extra);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1454:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(system(comm)) do_log(LOG_CRIT,"ERR mail");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1455:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"Sent copy of message to %s",config->extra);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c: In function 'context_init':
#
p3scan.c:1471:5: warning: assignment makes pointer from integer without a cast [enabled by default]
#
p=w_malloc(sizeof(struct proxycontext));
#
^
#
p3scan.c:1476:23: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_in'
#
p->socksize=sizeof(struct sockaddr_in);
#
^
#
p3scan.c:1476:15: warning: assignment makes integer from pointer without a cast [enabled by default]
#
p->socksize=sizeof(struct sockaddr_in);
#
^
#
p3scan.c:1481:16: warning: assignment from incompatible pointer type [enabled by default]
#
p->clientbuf=NULL;
#
^
#
p3scan.c:1482:16: warning: assignment from incompatible pointer type [enabled by default]
#
p->serverbuf=NULL;
#
^
#
p3scan.c:1483:13: warning: assignment from incompatible pointer type [enabled by default]
#
p->hdrbuf=NULL;
#
^
#
p3scan.c:1484:14: warning: assignment from incompatible pointer type [enabled by default]
#
p->virinfo=NULL;
#
^
#
p3scan.c:1485:15: warning: assignment from incompatible pointer type [enabled by default]
#
p->scanthis=NULL;
#
^
#
p3scan.c:1488:10: warning: assignment from incompatible pointer type [enabled by default]
#
p->ssl=NULL;
#
^
#
p3scan.c:1489:10: warning: assignment from incompatible pointer type [enabled by default]
#
p->ctx=NULL;
#
^
#
p3scan.c:1490:11: warning: assignment from incompatible pointer type [enabled by default]
#
p->sbio=NULL;
#
^
#
p3scan.c:1493:16: warning: assignment from incompatible pointer type [enabled by default]
#
p->dspamuser=NULL;
#
^
#
p3scan.c:1494:13: warning: assignment from incompatible pointer type [enabled by default]
#
p->actsvr=NULL;
#
^
#
p3scan.c: In function 'context_uninit':
#
p3scan.c:1503:7: warning: implicit declaration of function 'SSL_destroy_conn' [-Wimplicit-function-declaration]
#
if(p->usessl) SSL_destroy_conn(p->server_fd, p->ssl, p->ctx, p->sbio);
#
^
#
p3scan.c: In function 'closehdrfile':
#
p3scan.c:1517:39: error: 'O_RDONLY' undeclared (first use in this function)
#
p->header_fd = open(p->p3shdrfile, O_RDONLY);
#
^
#
p3scan.c:1521:14: error: 'LOG_EMERG' undeclared (first use in this function)
#
do_log(LOG_EMERG,"ERR: Critical error opening file '%s', Program aborted.", p->p3shdrfile);
#
^
#
p3scan.c:1521:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG,"ERR: Critical error opening file '%s', Program aborted.", p->p3shdrfile);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1526:14: error: 'LOG_DEBUG' undeclared (first use in this function)
#
do_log(LOG_DEBUG, "Informing email client to wait...");
#
^
#
p3scan.c:1526:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Informing email client to wait...");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c: In function 'do_sigterm_proxy':
#
p3scan.c:1534:11: error: 'LOG_DEBUG' undeclared (first use in this function)
#
do_log(LOG_DEBUG, "do_sigterm_proxy, signal %i", signr);
#
^
#
p3scan.c:1534:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "do_sigterm_proxy, signal %i", signr);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1535:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if (global_p == NULL){
#
^
#
p3scan.c:1536:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "already uninitialized");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1539:28: error: 'LOG_CRIT' undeclared (first use in this function)
#
if (signr != -1) do_log(LOG_CRIT, "ERR: We cot SIGTERM!"); /* sig -1 is ok */
#
^
#
p3scan.c:1539:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (signr != -1) do_log(LOG_CRIT, "ERR: We cot SIGTERM!"); /* sig -1 is ok */
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1543:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "calling uninit2");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1545:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "uninit2 done");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1547:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Uninit context");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1549:12: warning: assignment from incompatible pointer type [enabled by default]
#
global_p=NULL;
#
^
#
p3scan.c:1550:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"context_uninit done, exiting now");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1551:21: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
#
if (signr != -1) exit(1);
#
^
#
p3scan.c: In function 'proxy':
#
p3scan.c:1555:4: error: unknown type name 'fd_set'
#
fd_set fds_read;
#
^
#
p3scan.c:1556:19: error: storage size of 'timeout' isn't known
#
struct timeval timeout;
#
^
#
p3scan.c:1571:17: warning: initialization from incompatible pointer type [enabled by default]
#
char *smtptr=NULL;
#
^
#
p3scan.c:1573:4: error: unknown type name 'FILE'
#
FILE * scanner;
#
^
#
p3scan.c:1576:15: warning: initialization from incompatible pointer type [enabled by default]
#
char *tmp=NULL;
#
^
#
p3scan.c:1577:16: warning: initialization from incompatible pointer type [enabled by default]
#
char *tmp2=NULL;
#
^
#
p3scan.c:1585:18: error: request for member 'sin_family' in something not a structure or union
#
p->server_addr.sin_family = AF_INET;
#
^
#
p3scan.c:1585:32: error: 'AF_INET' undeclared (first use in this function)
#
p->server_addr.sin_family = AF_INET;
#
^
#
p3scan.c:1585:4: warning: statement with no effect [-Wunused-value]
#
p->server_addr.sin_family = AF_INET;
#
^
#
p3scan.c:1595:17: error: 'LOG_CRIT' undeclared (first use in this function)
#
do_log(LOG_CRIT, "ERR: Can't send +OK to client!");
#
^
#
p3scan.c:1595:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Can't send +OK to client!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1602:16: warning: implicit declaration of function 'strchr' [-Wimplicit-function-declaration]
#
tmp=strchr(p->clientbuf->line,'#');
#
^
#
p3scan.c:1602:20: warning: incompatible implicit declaration of built-in function 'strchr' [enabled by default]
#
tmp=strchr(p->clientbuf->line,'#');
#
^
#
p3scan.c:1605:129: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
do_log(LOG_CRIT, "Unable to find destination username#server:port separators %s", substr(p->clientbuf->line,6,strlen(p->clientbuf->line)));
#
^
#
p3scan.c:1605:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "Unable to find destination username#server:port separators %s", substr(p->clientbuf->line,6,strlen(p->clientbuf->line)));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1609:104: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
do_log(LOG_CRIT, "Unable to find destination #server %s",substr(p->clientbuf->line,6,strlen(p->clientbuf->line)));
#
^
#
p3scan.c:1609:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "Unable to find destination #server %s",substr(p->clientbuf->line,6,strlen(p->clientbuf->line)));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1613:102: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
do_log(LOG_CRIT, "Unable to find destination :port %s",substr(p->clientbuf->line,6,strlen(p->clientbuf->line)));
#
^
#
p3scan.c:1613:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "Unable to find destination :port %s",substr(p->clientbuf->line,6,strlen(p->clientbuf->line)));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1618:20: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
len=strlen(p->clientbuf->line);
#
^
#
p3scan.c:1619:29: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
#
p->dspamuser=strdup(substr(p->clientbuf->line,5,loc-5));
#
^
#
p3scan.c:1619:16: warning: passing argument 1 of 'strdup' makes pointer from integer without a cast [enabled by default]
#
p->dspamuser=strdup(substr(p->clientbuf->line,5,loc-5));
#
^
#
p3scan.c:1619:16: note: expected 'const char *' but argument is of type 'int'
#
p3scan.c:1620:16: warning: passing argument 1 of 'strdup' makes pointer from integer without a cast [enabled by default]
#
p->actsvr=strdup(substr(p->clientbuf->line,loc+1,loc2-loc-1));
#
^
#
p3scan.c:1620:16: note: expected 'const char *' but argument is of type 'int'
#
p3scan.c:1621:16: warning: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
#
p->actport=atoi(strdup(substr(p->clientbuf->line,loc2+1,len-loc2)));
#
^
#
p3scan.c:1621:16: warning: passing argument 1 of 'strdup' makes pointer from integer without a cast [enabled by default]
#
p3scan.c:1621:16: note: expected 'const char *' but argument is of type 'int'
#
p3scan.c:1622:30: error: request for member 'sin_port' in something not a structure or union
#
p->server_addr.sin_port=htons(p->actport);
#
^
#
p3scan.c:1622:16: warning: implicit declaration of function 'htons' [-Wimplicit-function-declaration]
#
p->server_addr.sin_port=htons(p->actport);
#
^
#
p3scan.c:1622:16: warning: statement with no effect [-Wunused-value]
#
p3scan.c:1623:16: warning: implicit declaration of function 'gethostbyname' [-Wimplicit-function-declaration]
#
p->server_host=gethostbyname(p->actsvr);
#
^
#
p3scan.c:1623:30: warning: assignment makes pointer from integer without a cast [enabled by default]
#
p->server_host=gethostbyname(p->actsvr);
#
^
#
p3scan.c:1625:19: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
#
memcpy(&p->server_addr.sin_addr.s_addr, p->server_host->h_addr_list[0], p->server_host->h_length);
#
^
#
p3scan.c:1625:41: error: request for member 'sin_addr' in something not a structure or union
#
memcpy(&p->server_addr.sin_addr.s_addr, p->server_host->h_addr_list[0], p->server_host->h_length);
#
^
#
p3scan.c:1625:50: error: request for member 's_addr' in something not a structure or union
#
memcpy(&p->server_addr.sin_addr.s_addr, p->server_host->h_addr_list[0], p->server_host->h_length);
#
^
#
p3scan.c:1625:73: error: dereferencing pointer to incomplete type
#
memcpy(&p->server_addr.sin_addr.s_addr, p->server_host->h_addr_list[0], p->server_host->h_length);
#
^
#
p3scan.c:1625:73: error: request for member 'h_addr_list' in something not a structure or union
#
p3scan.c:1625:105: error: dereferencing pointer to incomplete type
#
memcpy(&p->server_addr.sin_addr.s_addr, p->server_host->h_addr_list[0], p->server_host->h_length);
#
^
#
p3scan.c:1625:105: error: request for member 'h_length' in something not a structure or union
#
p3scan.c:1625:19: warning: passing argument 3 of 'memcpy' makes integer from pointer without a cast [enabled by default]
#
memcpy(&p->server_addr.sin_addr.s_addr, p->server_host->h_addr_list[0], p->server_host->h_length);
#
^
#
p3scan.c:1625:19: note: expected 'unsigned int' but argument is of type 'struct scanner_t **'
#
p3scan.c:1627:33: error: request for member 'sin_addr' in something not a structure or union
#
p->server_addr.sin_addr.s_addr = inet_addr(p->actsvr);
#
^
#
p3scan.c:1627:42: error: request for member 's_addr' in something not a structure or union
#
p->server_addr.sin_addr.s_addr = inet_addr(p->actsvr);
#
^
#
p3scan.c:1627:19: warning: implicit declaration of function 'inet_addr' [-Wimplicit-function-declaration]
#
p->server_addr.sin_addr.s_addr = inet_addr(p->actsvr);
#
^
#
p3scan.c:1627:19: warning: statement with no effect [-Wunused-value]
#
p3scan.c:1632:23: error: 'LOG_DEBUG' undeclared (first use in this function)
#
do_log(LOG_DEBUG,"client said: %s",p->clientbuf->line);
#
^
#
p3scan.c:1632:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"client said: %s",p->clientbuf->line);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1634:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Can't send '-ERR Not Identified' to client!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1637:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"Told client: -ERR Not Identified");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1642:7: warning: implicit declaration of function 'htonl' [-Wimplicit-function-declaration]
#
if (htonl(INADDR_ANY) == config->targetaddr.sin_addr.s_addr) {
#
^
#
p3scan.c:1642:17: error: 'INADDR_ANY' undeclared (first use in this function)
#
if (htonl(INADDR_ANY) == config->targetaddr.sin_addr.s_addr) {
#
^
#
p3scan.c:1642:50: error: request for member 'sin_addr' in something not a structure or union
#
if (htonl(INADDR_ANY) == config->targetaddr.sin_addr.s_addr) {
#
^
#
p3scan.c:1642:59: error: request for member 's_addr' in something not a structure or union
#
if (htonl(INADDR_ANY) == config->targetaddr.sin_addr.s_addr) {
#
^
#
p3scan.c:1642:29: warning: comparison between pointer and integer [enabled by default]
#
if (htonl(INADDR_ANY) == config->targetaddr.sin_addr.s_addr) {
#
^
#
p3scan.c:1643:10: warning: implicit declaration of function 'getsockopt' [-Wimplicit-function-declaration]
#
if (getsockopt(p->client_fd, SOL_IP, SO_ORIGINAL_DST, &p->server_addr, &p->socksize)){
#
^
#
p3scan.c:1643:39: error: 'SOL_IP' undeclared (first use in this function)
#
if (getsockopt(p->client_fd, SOL_IP, SO_ORIGINAL_DST, &p->server_addr, &p->socksize)){
#
^
#
p3scan.c:1643:47: error: 'SO_ORIGINAL_DST' undeclared (first use in this function)
#
if (getsockopt(p->client_fd, SOL_IP, SO_ORIGINAL_DST, &p->server_addr, &p->socksize)){
#
^
#
p3scan.c:1644:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: No IP-Conntrack-data (getsockopt failed)");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1648:10: warning: implicit declaration of function 'ntohl' [-Wimplicit-function-declaration]
#
if (((ntohl(p->server_addr.sin_addr.s_addr) == INADDR_LOOPBACK)
#
^
#
p3scan.c:1648:36: error: request for member 'sin_addr' in something not a structure or union
#
if (((ntohl(p->server_addr.sin_addr.s_addr) == INADDR_LOOPBACK)
#
^
#
p3scan.c:1648:45: error: request for member 's_addr' in something not a structure or union
#
if (((ntohl(p->server_addr.sin_addr.s_addr) == INADDR_LOOPBACK)
#
^
#
p3scan.c:1648:57: error: 'INADDR_LOOPBACK' undeclared (first use in this function)
#
if (((ntohl(p->server_addr.sin_addr.s_addr) == INADDR_LOOPBACK)
#
^
#
p3scan.c:1648:54: warning: comparison between pointer and integer [enabled by default]
#
if (((ntohl(p->server_addr.sin_addr.s_addr) == INADDR_LOOPBACK)
#
^
#
p3scan.c:1649:27: error: request for member 'sin_port' in something not a structure or union
#
&& p->server_addr.sin_port == config->addr.sin_port )
#
^
#
p3scan.c:1649:52: error: request for member 'sin_port' in something not a structure or union
#
&& p->server_addr.sin_port == config->addr.sin_port )
#
^
#
p3scan.c:1651:28: error: request for member 'sin_addr' in something not a structure or union
#
|| (p->server_addr.sin_addr.s_addr == p->client_addr.sin_addr.s_addr)){
#
^
#
p3scan.c:1651:37: error: request for member 's_addr' in something not a structure or union
#
|| (p->server_addr.sin_addr.s_addr == p->client_addr.sin_addr.s_addr)){
#
^
#
p3scan.c:1651:62: error: request for member 'sin_addr' in something not a structure or union
#
|| (p->server_addr.sin_addr.s_addr == p->client_addr.sin_addr.s_addr)){
#
^
#
p3scan.c:1651:71: error: request for member 's_addr' in something not a structure or union
#
|| (p->server_addr.sin_addr.s_addr == p->client_addr.sin_addr.s_addr)){
#
^
#
p3scan.c:1652:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Oops, that would loop!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1657:24: error: request for member 'sin_addr' in something not a structure or union
#
p->server_addr.sin_addr.s_addr = config->targetaddr.sin_addr.s_addr;
#
^
#
p3scan.c:1657:33: error: request for member 's_addr' in something not a structure or union
#
p->server_addr.sin_addr.s_addr = config->targetaddr.sin_addr.s_addr;
#
^
#
p3scan.c:1657:61: error: request for member 'sin_addr' in something not a structure or union
#
p->server_addr.sin_addr.s_addr = config->targetaddr.sin_addr.s_addr;
#
^
#
p3scan.c:1657:70: error: request for member 's_addr' in something not a structure or union
#
p->server_addr.sin_addr.s_addr = config->targetaddr.sin_addr.s_addr;
#
^
#
p3scan.c:1657:10: warning: statement with no effect [-Wunused-value]
#
p->server_addr.sin_addr.s_addr = config->targetaddr.sin_addr.s_addr;
#
^
#
p3scan.c:1658:24: error: request for member 'sin_port' in something not a structure or union
#
p->server_addr.sin_port = config->targetaddr.sin_port;
#
^
#
p3scan.c:1658:54: error: request for member 'sin_port' in something not a structure or union
#
p->server_addr.sin_port = config->targetaddr.sin_port;
#
^
#
p3scan.c:1658:10: warning: statement with no effect [-Wunused-value]
#
p->server_addr.sin_port = config->targetaddr.sin_port;
#
^
#
p3scan.c:1662:4: warning: implicit declaration of function 'socket' [-Wimplicit-function-declaration]
#
if ((p->server_fd = socket(PF_INET, SOCK_STREAM, 0)) < 0){
#
^
#
p3scan.c:1662:31: error: 'PF_INET' undeclared (first use in this function)
#
if ((p->server_fd = socket(PF_INET, SOCK_STREAM, 0)) < 0){
#
^
#
p3scan.c:1662:40: error: 'SOCK_STREAM' undeclared (first use in this function)
#
if ((p->server_fd = socket(PF_INET, SOCK_STREAM, 0)) < 0){
#
^
#
p3scan.c:1663:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Cannot open socket to real-server");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:132:34: error: 'IPTOS_THROUGHPUT' undeclared (first use in this function)
#
#define SET_TOS IPTOS_THROUGHPUT
#
^
#
p3scan.c:1667:8: note: in expansion of macro 'SET_TOS'
#
tos=SET_TOS;
#
^
#
p3scan.c:1667:7: warning: assignment makes integer from pointer without a cast [enabled by default]
#
tos=SET_TOS;
#
^
#
p3scan.c:1668:4: warning: implicit declaration of function 'setsockopt' [-Wimplicit-function-declaration]
#
if (setsockopt(p->client_fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) do_log(LOG_WARNING, "Can't set TOS (incoming connection)");
#
^
#
p3scan.c:1668:33: error: 'IPPROTO_IP' undeclared (first use in this function)
#
if (setsockopt(p->client_fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) do_log(LOG_WARNING, "Can't set TOS (incoming connection)");
#
^
#
p3scan.c:1668:45: error: 'IP_TOS' undeclared (first use in this function)
#
if (setsockopt(p->client_fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) do_log(LOG_WARNING, "Can't set TOS (incoming connection)");
#
^
#
p3scan.c:1668:80: error: 'LOG_WARNING' undeclared (first use in this function)
#
if (setsockopt(p->client_fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) do_log(LOG_WARNING, "Can't set TOS (incoming connection)");
#
^
#
p3scan.c:1668:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (setsockopt(p->client_fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) do_log(LOG_WARNING, "Can't set TOS (incoming connection)");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1669:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (setsockopt(p->server_fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) do_log(LOG_WARNING, "Can't set TOS (outgoing connection)");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1675:28: error: request for member 'sin_port' in something not a structure or union
#
if (ntohs(p->server_addr.sin_port)==config->smtpport){
#
^
#
p3scan.c:1678:14: error: 'LOG_NOTICE' undeclared (first use in this function)
#
do_log(LOG_NOTICE, "SMTP Connection from %s:%i", inet_ntoa(p->client_addr.sin_addr), ntohs(p->client_addr.sin_port));
#
^
#
p3scan.c:1678:80: error: request for member 'sin_addr' in something not a structure or union
#
do_log(LOG_NOTICE, "SMTP Connection from %s:%i", inet_ntoa(p->client_addr.sin_addr), ntohs(p->client_addr.sin_port));
#
^
#
p3scan.c:1678:112: error: request for member 'sin_port' in something not a structure or union
#
do_log(LOG_NOTICE, "SMTP Connection from %s:%i", inet_ntoa(p->client_addr.sin_addr), ntohs(p->client_addr.sin_port));
#
^
#
p3scan.c:1678:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, "SMTP Connection from %s:%i", inet_ntoa(p->client_addr.sin_addr), ntohs(p->client_addr.sin_port));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1679:34: error: request for member 'sin_port' in something not a structure or union
#
} else if(ntohs(p->server_addr.sin_port)==config->sslport){
#
^
#
p3scan.c:1681:81: error: request for member 'sin_addr' in something not a structure or union
#
do_log(LOG_NOTICE, "POP3S Connection from %s:%i", inet_ntoa(p->client_addr.sin_addr), ntohs(p->client_addr.sin_port));
#
^
#
p3scan.c:1681:113: error: request for member 'sin_port' in something not a structure or union
#
do_log(LOG_NOTICE, "POP3S Connection from %s:%i", inet_ntoa(p->client_addr.sin_addr), ntohs(p->client_addr.sin_port));
#
^
#
p3scan.c:1681:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, "POP3S Connection from %s:%i", inet_ntoa(p->client_addr.sin_addr), ntohs(p->client_addr.sin_port));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1683:80: error: request for member 'sin_addr' in something not a structure or union
#
do_log(LOG_NOTICE, "POP3 Connection from %s:%i", inet_ntoa(p->client_addr.sin_addr), ntohs(p->client_addr.sin_port));
#
^
#
p3scan.c:1683:112: error: request for member 'sin_port' in something not a structure or union
#
do_log(LOG_NOTICE, "POP3 Connection from %s:%i", inet_ntoa(p->client_addr.sin_addr), ntohs(p->client_addr.sin_port));
#
^
#
p3scan.c:1683:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, "POP3 Connection from %s:%i", inet_ntoa(p->client_addr.sin_addr), ntohs(p->client_addr.sin_port));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1685:79: error: request for member 'sin_addr' in something not a structure or union
#
do_log(LOG_NOTICE, "Real-server address is %s:%i", inet_ntoa(p->server_addr.sin_addr), ntohs(p->server_addr.sin_port));
#
^
#
p3scan.c:1685:111: error: request for member 'sin_port' in something not a structure or union
#
do_log(LOG_NOTICE, "Real-server address is %s:%i", inet_ntoa(p->server_addr.sin_addr), ntohs(p->server_addr.sin_port));
#
^
#
p3scan.c:1685:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, "Real-server address is %s:%i", inet_ntoa(p->server_addr.sin_addr), ntohs(p->server_addr.sin_port));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1686:4: warning: implicit declaration of function 'SSL_create_conn' [-Wimplicit-function-declaration]
#
if (p->usessl) ret=SSL_create_conn(p->server_fd, (struct sockaddr *) &p->server_addr, p->socksize, &p->ssl, &p->ctx, &p->sbio);
#
^
#
p3scan.c:1687:4: warning: implicit declaration of function 'connect' [-Wimplicit-function-declaration]
#
else ret=connect(p->server_fd, (struct sockaddr *) &p->server_addr, p->socksize);
#
^
#
p3scan.c:1689:89: error: request for member 'sin_addr' in something not a structure or union
#
do_log(LOG_CRIT, "ERR: Cannot connect to real-server: %s",inet_ntoa(p->server_addr.sin_addr));
#
^
#
p3scan.c:1689:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Cannot connect to real-server: %s",inet_ntoa(p->server_addr.sin_addr));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1699:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "starting mainloop");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1706:11: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Line too long: Getting rest of line.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1708:11: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Closing connection (no more input from client)");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1714:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (p->ismail < 2 || p->ismail >4) do_log(LOG_DEBUG, "--> %s", p->clientbuf->line);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1720:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
} else do_log(LOG_DEBUG, "--> %s", p->clientbuf->line);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1724:7: warning: implicit declaration of function 'getline_ssl' [-Wimplicit-function-declaration]
#
if (p->usessl) serverret=getline_ssl(p->ssl, p->serverbuf);
#
^
#
p3scan.c:1728:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Line too long: Getting rest of line.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1730:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Closing connection (no more input from server)");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1736:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "%s: NOOP response. Flushed %i NOOP's", p->serverbuf->line, p->noop);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1740:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Oops, %s doesn't looks like a server's NOOP response. Waiting next...", p->serverbuf->line);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1744:55: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if (serverret==GETLINE_OK && p->serverbuf->line != NULL
#
^
#
p3scan.c:1748:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
) do_log(LOG_DEBUG, "<-- %s", p->serverbuf->line);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1750:58: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if (serverret==GETLINE_OK && p->serverbuf->line != NULL && !strncasecmp(p->serverbuf->line,"+OK",3)) {
#
^
#
p3scan.c:1751:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Not sending %s to client...", p->serverbuf->line);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1755:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"--> USER %s",p->dspamuser);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1757:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "..................us us us us us......................");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1758:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "............and them them them them them..............");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1759:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "........and after all, were only ordinary men.........");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1760:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "..................me me me me me......................");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1761:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "...............and you you you you you................");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1762:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "god only knows, its not what we would choose, to do...");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1767:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "not reading input buffers...");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1773:23: error: request for member 'tv_sec' in something not a structure or union
#
timeout.tv_sec = 300;
#
^
#
p3scan.c:1773:16: warning: statement with no effect [-Wunused-value]
#
timeout.tv_sec = 300;
#
^
#
p3scan.c:1774:23: error: request for member 'tv_usec' in something not a structure or union
#
timeout.tv_usec = 0;
#
^
#
p3scan.c:1774:16: warning: statement with no effect [-Wunused-value]
#
timeout.tv_usec = 0;
#
^
#
p3scan.c:1777:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "select returned %i", ret);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1787:20: error: request for member 'tv_sec' in something not a structure or union
#
timeout.tv_sec = 300;
#
^
#
p3scan.c:1787:13: warning: statement with no effect [-Wunused-value]
#
timeout.tv_sec = 300;
#
^
#
p3scan.c:1788:20: error: request for member 'tv_usec' in something not a structure or union
#
timeout.tv_usec = 0;
#
^
#
p3scan.c:1788:13: warning: statement with no effect [-Wunused-value]
#
timeout.tv_usec = 0;
#
^
#
p3scan.c:1791:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "select returned %i", ret);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1797:42: warning: assignment from incompatible pointer type [enabled by default]
#
if (p->ismail>3) p->serverbuf->line=NULL;
#
^
#
p3scan.c:1804:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_WARNING,"RETR msg %i (<1) !!!! ", p->msgnum);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1807:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"RETR %i (%d)", p->msgnum, config->scannerenabled);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1815:13: warning: implicit declaration of function 'right' [-Wimplicit-function-declaration]
#
paramlist_set(p->params, "%USERNAME%",right(p->clientbuf->line,strlen(p->clientbuf->line)-5));
#
^
#
p3scan.c:1815:76: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
paramlist_set(p->params, "%USERNAME%",right(p->clientbuf->line,strlen(p->clientbuf->line)-5));
#
^
#
p3scan.c:1815:13: warning: passing argument 3 of 'paramlist_set' makes pointer from integer without a cast [enabled by default]
#
paramlist_set(p->params, "%USERNAME%",right(p->clientbuf->line,strlen(p->clientbuf->line)-5));
#
^
#
In file included from p3scan.c:77:0:
#
parsefile.h:87:5: note: expected 'char *' but argument is of type 'int'
#
int paramlist_set(struct paramlist * params, char * name, char * value);
#
^
#
p3scan.c:1821:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"Client checking server CAPABILITIES...");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1827:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_WARNING,"TOP msg %i (<1) !!!! ", p->msgnum);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1830:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"TOP %i", p->msgnum);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1839:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_WARNING,"Ignoring client TOP request." );
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1847:48: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
smtpsze=atoi(substr(smtptr,5,strlen(smtptr)-5)) / 1024;
#
^
#
p3scan.c:1849:22: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT,"SMTP Message too large for scanning: %i",smtpsze);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1855:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
}else do_log(LOG_DEBUG,"smtpsize=%i",smtpsze);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1866:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"intercepted DATA command. smtpcmd=%i",smtpcmd);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1878:16: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
#
memcpy(buf, (char *)(p->clientbuf->line)+5, len );
#
^
#
p3scan.c:1882:30: warning: incompatible implicit declaration of built-in function 'strchr' [enabled by default]
#
char *pbuf=strchr(buf,' ');
#
^
#
p3scan.c:1883:27: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if(NULL != pbuf) *pbuf='\0';
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:93:4: warning: incompatible implicit declaration of built-in function 'memmove' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:1885:16: note: in expansion of macro 'TRIM'
#
TRIM(buf);
#
^
#
p3scan.h:93:27: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:1885:16: note: in expansion of macro 'TRIM'
#
TRIM(buf);
#
^
#
p3scan.c:1886:20: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
if (strlen(NONULL(paramlist_get(p->params, "%USERNAME%")))) paramlist_set(p->params, "%USERNAME%", buf);
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:1886:27: note: in expansion of macro 'NONULL'
#
if (strlen(NONULL(paramlist_get(p->params, "%USERNAME%")))) paramlist_set(p->params, "%USERNAME%", buf);
#
^
#
p3scan.c:1888:20: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
if (strlen(NONULL(paramlist_get(p->params, "%USERNAME%")))) paramlist_set(p->params, "%USERNAME%", "unknown");
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:1888:27: note: in expansion of macro 'NONULL'
#
if (strlen(NONULL(paramlist_get(p->params, "%USERNAME%")))) paramlist_set(p->params, "%USERNAME%", "unknown");
#
^
#
p3scan.c:1890:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, "USER '%s'", paramlist_get(p->params, "%USERNAME%"));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1891:17: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
if (strlen(NONULL(p->dspamuser))) p->dspamuser=paramlist_get(p->params,"%USERNAME%");
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:1891:24: note: in expansion of macro 'NONULL'
#
if (strlen(NONULL(p->dspamuser))) p->dspamuser=paramlist_get(p->params,"%USERNAME%");
#
^
#
p3scan.c:1898:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Can't send to server!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1926:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Can't send 354 to client!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1930:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Sent 354 "PROGNAME" "VERSION" accepting data.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1941:20: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
len=strlen(config->virusdir)+14;
#
^
#
p3scan.c:1942:16: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
snprintf(p->mailfile, len, "%sp3scan.XXXXXX", config->virusdir);
#
^
#
p3scan.c:1948:26: error: 'LOG_EMERG' undeclared (first use in this function)
#
do_log(LOG_EMERG,"ERR: Critical error opening file '%s', Program aborted.", p->mailfile);
#
^
#
p3scan.c:1948:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG,"ERR: Critical error opening file '%s', Program aborted.", p->mailfile);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1951:30: warning: assignment makes pointer from integer without a cast [enabled by default]
#
p->filename=right(p->mailfile,14);
#
^
#
p3scan.c:1956:22: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG,"ERR: Critical error opening file '%s', Program aborted.", p->p3shdrfile);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1975:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "ismail=1, but we haven't got '+ok' so... setting p->ismail=0");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1985:36: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if(config->footer!=NULL){
#
^
#
p3scan.c:1986:26: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
len=strlen(config->footer);
#
^
#
p3scan.c:1987:22: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
snprintf(fcmd, len+1, "%s 2>&1", config->footer);
#
^
#
p3scan.c:1988:34: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((scanner=popen(fcmd, "r"))==NULL){
#
^
#
p3scan.c:1988:52: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((scanner=popen(fcmd, "r"))==NULL){
#
^
#
p3scan.c:1989:25: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Can't get scanner version '%s' !!!", fcmd);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1991:59: warning: comparison between pointer and integer [enabled by default]
#
while ((fgets(line, 512, scanner))!=NULL){
#
^
#
p3scan.c:2010:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"Closing header buffer.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2012:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
}else if (!p->cksmtp) do_log(LOG_DEBUG,"notified=%i",p->notified);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2018:19: warning: incompatible implicit declaration of built-in function 'strstr' [enabled by default]
#
if(strstr(p->clientbuf->line,"MIME") || strstr(p->clientbuf->line,"Content-Type") || !strncasecmp(p->clientbuf->line,"Subject:",8)){
#
^
#
p3scan.c:2020:22: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"Caught MIME/Subj line, closing header buffer.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2039:19: warning: incompatible implicit declaration of built-in function 'strstr' [enabled by default]
#
if(strstr(p->serverbuf->line,"MIME") || strstr(p->serverbuf->line,"Content-Type") || !strncasecmp(p->serverbuf->line,"Subject:",8)){
#
^
#
p3scan.c:2042:22: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"Caught MIME/Subj line, closing header buffer.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2057:36: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if (config->ispspam != NULL && strstr(p->serverbuf->line,config->ispspam)!=NULL) config->ispam=1;
#
^
#
p3scan.c:2057:89: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if (config->ispspam != NULL && strstr(p->serverbuf->line,config->ispspam)!=NULL) config->ispam=1;
#
^
#
p3scan.c:2061:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (error < 0) do_log(LOG_CRIT,"ERR: Writing to client!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2067:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "got '.\\r\\n', mail is complete.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2077:25: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't initialize scanner!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2087:16: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
snprintf(p->maildir, 4090, "%s.dir", p->mailfile);
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:93:4: warning: incompatible implicit declaration of built-in function 'memmove' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:2091:38: note: in expansion of macro 'TRIM'
#
if (p->virinfo) TRIM(p->virinfo);
#
^
#
p3scan.h:93:27: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:2091:38: note: in expansion of macro 'TRIM'
#
if (p->virinfo) TRIM(p->virinfo);
#
^
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:2092:62: note: in expansion of macro 'NONULL'
#
paramlist_set(p->params, "%VIRUSNAME%", NONULL(p->virinfo));
#
^
#
p3scan.c:2103:22: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2107:28: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT,"ERR: Virusaction failed. Sending 554 and reseting smtp data sent.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2109:28: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"Sending RSET to real smtp server.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2113:28: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT,"ERR: Virusaction failed. Sending -ERR and closing pop3 connection.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2126:22: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (!p->errmsg) do_log(LOG_CRIT,"ERR: Writing to client!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2136:29: error: 'LOG_ALERT' undeclared (first use in this function)
#
do_log(LOG_ALERT, "ERR: We can't say if it is a virus! So we have to give the client the mail! You should check your configuration/system");
#
^
#
p3scan.c:2136:22: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_ALERT, "ERR: We can't say if it is a virus! So we have to give the client the mail! You should check your configuration/system");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2139:22: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Scanner returned unexpected error code. You should check your configuration/system.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2143:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Scanning done, sending mail now.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2146:22: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Sending DATA to server.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2148:25: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Can't send DATA to server!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2152:22: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Sending smtp message to server.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2154:25: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Can't submit mail! We have to quit now!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2160:25: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Can't send mail! We have to quit now!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2165:19: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Sending done.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2175:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Mail action complete");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2184:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_WARNING, "Ignoring servers PIPELINING capability...");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2188:12: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_WARNING, "Ignoring servers TOP capability...");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2192:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_WARNING, "Ignoring servers STLS capability...");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2195:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_WARNING, "Ignoring SMTP servers PIPELINING capability...");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2204:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Can't send to client");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2207:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
} else if (p->cksmtp) do_log(LOG_DEBUG,"Caught servers 354");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2212:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_WARNING, "Connection timeout");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2213:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Child finished");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:1570:8: warning: variable 'smtprstlb' set but not used [-Wunused-but-set-variable]
#
int smtprstlb=0;
#
^
#
p3scan.c:1556:19: warning: unused variable 'timeout' [-Wunused-variable]
#
struct timeval timeout;
#
^
#
p3scan.c: At top level:
#
p3scan.c:2217:22: error: unknown type name 'pid_t'
#
int do_sigchld_check(pid_t pid, int stat){
#
^
#
p3scan.c: In function 'do_sigchld':
#
p3scan.c:2232:4: error: unknown type name 'pid_t'
#
pid_t pid;
#
^
#
p3scan.c:2234:4: warning: implicit declaration of function 'waitpid' [-Wimplicit-function-declaration]
#
while ((pid=waitpid(-1, &stat, WNOHANG)) > 0){
#
^
#
p3scan.c:2234:35: error: 'WNOHANG' undeclared (first use in this function)
#
while ((pid=waitpid(-1, &stat, WNOHANG)) > 0){
#
^
#
p3scan.c:2235:7: warning: implicit declaration of function 'do_sigchld_check' [-Wimplicit-function-declaration]
#
do_sigchld_check(pid, stat);
#
^
#
p3scan.c: In function 'printversion':
#
p3scan.c:2240:4: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
#
printf(
#
^
#
p3scan.c:2240:4: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
#
p3scan.c: In function 'usage':
#
p3scan.c:2253:4: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
#
printf(
#
^
#
p3scan.c:2311:4: warning: implicit declaration of function 'basename' [-Wimplicit-function-declaration]
#
, basename(progname), POP3SPORT, PORT_NUMBER, PORT_NUMBER);
#
^
#
p3scan.c:2311:4: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat=]
#
p3scan.c: In function 'parseoptions':
#
p3scan.c:2348:18: error: array type has incomplete element type
#
struct option long_options[] = {
#
^
#
p3scan.c:2349:22: error: 'required_argument' undeclared (first use in this function)
#
{ "renattach", required_argument, NULL, 'a' },
#
^
#
p3scan.c:2350:22: error: 'no_argument' undeclared (first use in this function)
#
{ "altvnmsg", no_argument, NULL, 'A' },
#
^
#
p3scan.c: In function 'switchoption':
#
p3scan.c:2411:16: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s '%s' is not allowed in configfile!\n", where, optstr);
#
^
#
p3scan.c:2411:24: error: 'stderr' undeclared (first use in this function)
#
fprintf(stderr, "%s '%s' is not allowed in configfile!\n", where, optstr);
#
^
#
p3scan.c:2424:13: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
#
exit(0);
#
^
#
p3scan.c:2443:13: warning: implicit declaration of function 'strtol' [-Wimplicit-function-declaration]
#
i=strtol(arg, &rest, 10);
#
^
#
p3scan.c:2444:25: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
if (rest && strlen(rest)>0){
#
^
#
p3scan.c:2446:19: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s %s isn't a valid port\n", where, arg);
#
^
#
p3scan.c:2449:19: warning: implicit declaration of function 'getservbyname' [-Wimplicit-function-declaration]
#
if((port=getservbyname(arg, "tcp"))!=NULL) config->smtpport=ntohs(port->s_port);
#
^
#
p3scan.c:2449:27: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if((port=getservbyname(arg, "tcp"))!=NULL) config->smtpport=ntohs(port->s_port);
#
^
#
p3scan.c:2449:54: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if((port=getservbyname(arg, "tcp"))!=NULL) config->smtpport=ntohs(port->s_port);
#
^
#
p3scan.c:2449:89: error: dereferencing pointer to incomplete type
#
if((port=getservbyname(arg, "tcp"))!=NULL) config->smtpport=ntohs(port->s_port);
#
^
#
p3scan.c:2449:89: error: request for member 's_port' in something not a structure or union
#
p3scan.c:2451:22: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "Port lookup for '%s/tcp' failed! Check /etc/services\n", arg);
#
^
#
p3scan.c:2458:19: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s Incorrect emailport portnumber\n", where);
#
^
#
p3scan.c:2465:45: error: 'O_RDONLY' undeclared (first use in this function)
#
if ((pidfd=open(config->pidfile,O_RDONLY ))>=0){
#
^
#
p3scan.c:2466:23: error: 'LOG_EMERG' undeclared (first use in this function)
#
do_log(LOG_EMERG, "ERR: PID file %s exists! Aborting!",config->pidfile);
#
^
#
p3scan.c:2466:16: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: PID file %s exists! Aborting!",config->pidfile);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2476:19: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s %s isn't a valid port\n", where, arg);
#
^
#
p3scan.c:2479:27: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if((port=getservbyname(arg, "tcp"))!=NULL) config->sslport=ntohs(port->s_port);
#
^
#
p3scan.c:2479:54: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if((port=getservbyname(arg, "tcp"))!=NULL) config->sslport=ntohs(port->s_port);
#
^
#
p3scan.c:2479:88: error: dereferencing pointer to incomplete type
#
if((port=getservbyname(arg, "tcp"))!=NULL) config->sslport=ntohs(port->s_port);
#
^
#
p3scan.c:2479:88: error: request for member 's_port' in something not a structure or union
#
p3scan.c:2481:22: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "Port lookup for '%s/tcp' failed! Check /etc/services\n", arg);
#
^
#
p3scan.c:2488:19: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s Incorrect POP3S portnumber\n", where);
#
^
#
p3scan.c:2512:16: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s --maxchilds has to be 1 < val < 10000\n", where);
#
^
#
p3scan.c:2518:28: error: request for member 'sin_addr' in something not a structure or union
#
config->addr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2518:37: error: request for member 's_addr' in something not a structure or union
#
config->addr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2518:51: error: 'INADDR_ANY' undeclared (first use in this function)
#
config->addr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2518:16: warning: statement with no effect [-Wunused-value]
#
config->addr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2519:13: warning: implicit declaration of function 'inet_aton' [-Wimplicit-function-declaration]
#
}else if (!inet_aton(arg, &config->addr.sin_addr)){
#
^
#
p3scan.c:2519:52: error: request for member 'sin_addr' in something not a structure or union
#
}else if (!inet_aton(arg, &config->addr.sin_addr)){
#
^
#
p3scan.c:2520:16: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s %s isn't a valid IP Adress\n", where, arg);
#
^
#
p3scan.c:2526:34: error: request for member 'sin_addr' in something not a structure or union
#
config->targetaddr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2526:43: error: request for member 's_addr' in something not a structure or union
#
config->targetaddr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2526:16: warning: statement with no effect [-Wunused-value]
#
config->targetaddr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2527:58: error: request for member 'sin_addr' in something not a structure or union
#
}else if (!inet_aton(arg, &config->targetaddr.sin_addr)){
#
^
#
p3scan.c:2528:16: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s %s isn't a valid IP Adress\n", where, arg);
#
^
#
p3scan.c:2538:16: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s --timeout has to be 1 < val < 10000\n", where);
#
^
#
p3scan.c:2546:19: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s %s isn't a valid port\n", where, arg);
#
^
#
p3scan.c:2549:27: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if((port=getservbyname(arg, "tcp"))!=NULL){
#
^
#
p3scan.c:2549:54: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if((port=getservbyname(arg, "tcp"))!=NULL){
#
^
#
p3scan.c:2550:34: error: request for member 'sin_port' in something not a structure or union
#
config->addr.sin_port=port->s_port;
#
^
#
p3scan.c:2550:48: error: dereferencing pointer to incomplete type
#
config->addr.sin_port=port->s_port;
#
^
#
p3scan.c:2550:48: error: request for member 's_port' in something not a structure or union
#
p3scan.c:2550:22: warning: statement with no effect [-Wunused-value]
#
config->addr.sin_port=port->s_port;
#
^
#
p3scan.c:2552:22: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "Port lookup for '%s/tcp' failed! Check /etc/services\n", arg);
#
^
#
p3scan.c:2557:36: error: request for member 'sin_port' in something not a structure or union
#
if (i>0)config->addr.sin_port=htons((int)i);
#
^
#
p3scan.c:2557:24: warning: statement with no effect [-Wunused-value]
#
if (i>0)config->addr.sin_port=htons((int)i);
#
^
#
p3scan.c:2559:19: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s Incorrect POP3 portnumber\n", where);
#
^
#
p3scan.c:2568:19: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s %s isn't a valid port\n", where, arg);
#
^
#
p3scan.c:2571:27: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if((port=getservbyname(arg, "tcp"))!=NULL){
#
^
#
p3scan.c:2571:54: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if((port=getservbyname(arg, "tcp"))!=NULL){
#
^
#
p3scan.c:2572:40: error: request for member 'sin_port' in something not a structure or union
#
config->targetaddr.sin_port=port->s_port;
#
^
#
p3scan.c:2572:54: error: dereferencing pointer to incomplete type
#
config->targetaddr.sin_port=port->s_port;
#
^
#
p3scan.c:2572:54: error: request for member 's_port' in something not a structure or union
#
p3scan.c:2572:22: warning: statement with no effect [-Wunused-value]
#
config->targetaddr.sin_port=port->s_port;
#
^
#
p3scan.c:2574:22: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "Port lookup for '%s/tcp' failed! Check /etc/services\n", arg);
#
^
#
p3scan.c:2579:42: error: request for member 'sin_port' in something not a structure or union
#
if (i>0)config->targetaddr.sin_port=htons((int)i);
#
^
#
p3scan.c:2579:24: warning: statement with no effect [-Wunused-value]
#
if (i>0)config->targetaddr.sin_port=htons((int)i);
#
^
#
p3scan.c:2581:19: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s Incorrect target portnumber\n", where);
#
^
#
p3scan.c:2604:13: warning: implicit declaration of function 'strtok' [-Wimplicit-function-declaration]
#
next_tok = strtok(arg, " \t,");
#
^
#
p3scan.c:2604:22: warning: assignment makes pointer from integer without a cast [enabled by default]
#
next_tok = strtok(arg, " \t,");
#
^
#
p3scan.c:2610:25: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s --viruscode has be a list of numbers (%s)\n", where, rest);
#
^
#
p3scan.c:2615:34: warning: assignment makes pointer from integer without a cast [enabled by default]
#
}while ((next_tok = strtok(NULL, " \t,")) || (ii >= MAX_VIRUS_CODES));
#
^
#
p3scan.c:2619:16: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s --viruscode has be a list of numbers (%s)\n", where, rest);
#
^
#
p3scan.c:2625:22: warning: assignment makes pointer from integer without a cast [enabled by default]
#
next_tok = strtok(arg, " \t,");
#
^
#
p3scan.c:2631:25: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s --good viruscode has be a list of numbers (%s)\n", where, rest);
#
^
#
p3scan.c:2636:34: warning: assignment makes pointer from integer without a cast [enabled by default]
#
}while ((next_tok = strtok(NULL, " \t,")) || (ii >= MAX_VIRUS_CODES));
#
^
#
p3scan.c:2640:16: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s --good viruscode has be a list of numbers (%s)\n", where, rest);
#
^
#
p3scan.c:2655:16: warning: implicit declaration of function 'strcasecmp' [-Wimplicit-function-declaration]
#
if(!strcasecmp(arg, scannerlist[i]->name)){
#
^
#
p3scan.c:2663:16: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s scannertype '%s' is not supported", where, arg);
#
^
#
p3scan.c:2670:13: warning: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
#
if (arg[i-2]=='/' && isdigit(arg[i-1])){
#
^
#
p3scan.c:2712:13: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(stderr, "%s Option '%s' isn't known\n", where, optstr);
#
^
#
p3scan.c: In function 'parseargs':
#
p3scan.c:2718:7: error: 'opterr' undeclared (first use in this function)
#
opterr=0;
#
^
#
p3scan.c:2718:7: warning: statement with no effect [-Wunused-value]
#
p3scan.c:2719:7: error: 'optind' undeclared (first use in this function)
#
optind=1;
#
^
#
p3scan.c:2719:7: warning: statement with no effect [-Wunused-value]
#
p3scan.c:2721:10: warning: implicit declaration of function 'getopt_long' [-Wimplicit-function-declaration]
#
option = getopt_long(c, v, getoptparam,
#
^
#
p3scan.c:2723:24: error: 'EOF' undeclared (first use in this function)
#
if (option == EOF) break;
#
^
#
p3scan.c:2723:21: warning: comparison between pointer and integer [enabled by default]
#
if (option == EOF) break;
#
^
#
p3scan.c:2724:31: error: 'optarg' undeclared (first use in this function)
#
switchoption(option, optarg, v[optind-1], where, state);
#
^
#
p3scan.c:2724:40: error: array subscript is not an integer
#
switchoption(option, optarg, v[optind-1], where, state);
#
^
#
p3scan.c:2724:10: warning: passing argument 2 of 'switchoption' from incompatible pointer type [enabled by default]
#
switchoption(option, optarg, v[optind-1], where, state);
#
^
#
p3scan.c:2401:9: note: expected 'char *' but argument is of type 'struct scanner_t **'
#
void switchoption(char opt, char * arg, char * optstr, char * where, int state){
#
^
#
p3scan.c:2724:10: warning: passing argument 3 of 'switchoption' from incompatible pointer type [enabled by default]
#
switchoption(option, optarg, v[optind-1], where, state);
#
^
#
p3scan.c:2401:9: note: expected 'char *' but argument is of type 'struct scanner_t **'
#
void switchoption(char opt, char * arg, char * optstr, char * where, int state){
#
^
#
p3scan.c:2726:50: warning: comparison between pointer and integer [enabled by default]
#
if (state != CONFIG_STATE_CMDPRE && optind < c){
#
^
#
p3scan.c:2728:24: warning: comparison between pointer and integer [enabled by default]
#
while (optind < c) fprintf(stderr, "%s Unknown option '%s'\n", where, v[optind++]);
#
^
#
p3scan.c:2728:29: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
while (optind < c) fprintf(stderr, "%s Unknown option '%s'\n", where, v[optind++]);
#
^
#
p3scan.c:2728:37: error: 'stderr' undeclared (first use in this function)
#
while (optind < c) fprintf(stderr, "%s Unknown option '%s'\n", where, v[optind++]);
#
^
#
p3scan.c:2728:88: error: lvalue required as increment operand
#
while (optind < c) fprintf(stderr, "%s Unknown option '%s'\n", where, v[optind++]);
#
^
#
p3scan.c:2728:81: error: array subscript is not an integer
#
while (optind < c) fprintf(stderr, "%s Unknown option '%s'\n", where, v[optind++]);
#
^
#
p3scan.c:2728:10: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'struct scanner_t **' [-Wformat=]
#
while (optind < c) fprintf(stderr, "%s Unknown option '%s'\n", where, v[optind++]);
#
^
#
p3scan.c: In function 'parseoptions':
#
p3scan.c:2731:10: warning: assignment makes pointer from integer without a cast [enabled by default]
#
config=w_malloc(sizeof(struct configuration_t));
#
^
#
p3scan.c:2735:21: warning: assignment from incompatible pointer type [enabled by default]
#
config->overwrite=OVERWRITE;
#
^
#
p3scan.c:2736:21: warning: assignment from incompatible pointer type [enabled by default]
#
config->renattach=NULL;
#
^
#
p3scan.c:2737:16: error: request for member 'sin_port' in something not a structure or union
#
config->addr.sin_port=htons((int)PORT_NUMBER);
#
^
#
p3scan.c:2737:4: warning: statement with no effect [-Wunused-value]
#
config->addr.sin_port=htons((int)PORT_NUMBER);
#
^
#
p3scan.c:2738:22: error: request for member 'sin_port' in something not a structure or union
#
config->targetaddr.sin_port=htons((int)PORT_NUMBER);
#
^
#
p3scan.c:2738:4: warning: statement with no effect [-Wunused-value]
#
config->targetaddr.sin_port=htons((int)PORT_NUMBER);
#
^
#
p3scan.c:2744:21: warning: assignment from incompatible pointer type [enabled by default]
#
config->runasuser=NULL;
#
^
#
p3scan.c:2745:20: warning: assignment from incompatible pointer type [enabled by default]
#
config->virusdir=NULL;
#
^
#
p3scan.c:2746:24: warning: assignment from incompatible pointer type [enabled by default]
#
config->virusdirbase=NULL;
#
^
#
p3scan.c:2747:21: warning: assignment from incompatible pointer type [enabled by default]
#
config->notifydir=NULL;
#
^
#
p3scan.c:2748:25: warning: assignment from incompatible pointer type [enabled by default]
#
config->virustemplate=NULL;
#
^
#
p3scan.c:2749:24: warning: assignment from incompatible pointer type [enabled by default]
#
config->virusscanner=NULL;
#
^
#
p3scan.c:2751:19: warning: assignment from incompatible pointer type [enabled by default]
#
config->pidfile=NULL;
#
^
#
p3scan.c:2753:22: warning: assignment from incompatible pointer type [enabled by default]
#
config->syslogname=NULL;
#
^
#
p3scan.c:2754:16: error: request for member 'sin_addr' in something not a structure or union
#
config->addr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2754:25: error: request for member 's_addr' in something not a structure or union
#
config->addr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2754:39: error: 'INADDR_ANY' undeclared (first use in this function)
#
config->addr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2754:4: warning: statement with no effect [-Wunused-value]
#
config->addr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2755:22: error: request for member 'sin_addr' in something not a structure or union
#
config->targetaddr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2755:31: error: request for member 's_addr' in something not a structure or union
#
config->targetaddr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2755:4: warning: statement with no effect [-Wunused-value]
#
config->targetaddr.sin_addr.s_addr=htonl(INADDR_ANY);
#
^
#
p3scan.c:2756:19: warning: assignment from incompatible pointer type [enabled by default]
#
config->scanner=NULL;
#
^
#
p3scan.c:2757:23: warning: assignment from incompatible pointer type [enabled by default]
#
config->virusregexp=NULL;
#
^
#
p3scan.c:2764:19: warning: assignment from incompatible pointer type [enabled by default]
#
config->ispspam=NULL;
#
^
#
p3scan.c:2765:17: warning: assignment from incompatible pointer type [enabled by default]
#
config->extra=NULL;
#
^
#
p3scan.c:2770:18: warning: assignment from incompatible pointer type [enabled by default]
#
config->footer=NULL;
#
^
#
p3scan.c:2772:20: warning: assignment from incompatible pointer type [enabled by default]
#
config->emergcon=NULL;
#
^
#
p3scan.c:2773:21: warning: assignment from incompatible pointer type [enabled by default]
#
config->emergency=NULL;
#
^
#
p3scan.c:2778:26: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
#
config->configfile=strdup(CONFIGFILE); //TODO: 24 bytes in 1 blocks are definitely lost in loss record 2 of 2
#
^
#
p3scan.c:2781:37: error: 'O_RDONLY' undeclared (first use in this function)
#
if ((fp=open(config->configfile, O_RDONLY))>=0){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:93:4: warning: incompatible implicit declaration of built-in function 'memmove' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:2787:13: note: in expansion of macro 'TRIM'
#
TRIM(cf->line);
#
^
#
p3scan.h:93:27: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
memmove((a),&(a)[len], strlen(&(a)[len])+1); \
#
^
#
p3scan.c:2787:13: note: in expansion of macro 'TRIM'
#
TRIM(cf->line);
#
^
#
p3scan.c:2792:30: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
line=w_malloc(strlen(cf->line)+3);
#
^
#
p3scan.c:2792:20: warning: assignment makes pointer from integer without a cast [enabled by default]
#
line=w_malloc(strlen(cf->line)+3);
#
^
#
p3scan.c:2794:16: warning: incompatible implicit declaration of built-in function 'strcat' [enabled by default]
#
strcat(line, cf->line);
#
^
#
p3scan.c:2796:16: warning: implicit declaration of function 'strcspn' [-Wimplicit-function-declaration]
#
if ((i=strcspn(line, " =\t"))>1){
#
^
#
p3scan.c:2796:23: warning: incompatible implicit declaration of built-in function 'strcspn' [enabled by default]
#
if ((i=strcspn(line, " =\t"))>1){
#
^
#
p3scan.c:2799:22: warning: implicit declaration of function 'strspn' [-Wimplicit-function-declaration]
#
if ((ii=strspn(line+i+1," =\t"))>=0){
#
^
#
p3scan.c:2799:30: warning: incompatible implicit declaration of built-in function 'strspn' [enabled by default]
#
if ((ii=strspn(line+i+1," =\t"))>=0){
#
^
#
p3scan.c:2803:28: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
#
memcpy(pargv[pargc]+i+1, rest, strlen(rest)+1); //TODO: Source and destination overlap in memcpy
#
^
#
p3scan.c:2814:19: warning: assignment from incompatible pointer type [enabled by default]
#
pargv[pargc]=NULL;
#
^
#
p3scan.c:2817:15: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]
#
if(dofree) free(config->configfile);
#
^
#
p3scan.c:2821:7: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
#
printf(
#
^
#
p3scan.c:2826:7: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
#
exit(1);
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:86:33: warning: assignment from incompatible pointer type [enabled by default]
#
#define SETIFNULL(a,b) if (!a) a=b /* wow, that's magic */
#
^
#
p3scan.c:2835:4: note: in expansion of macro 'SETIFNULL'
#
SETIFNULL(config->virusscanner, VIRUS_SCANNER);
#
^
#
p3scan.c:2348:18: warning: unused variable 'long_options' [-Wunused-variable]
#
struct option long_options[] = {
#
^
#
p3scan.c: In function 'do_sigterm_main':
#
p3scan.c:2849:29: error: 'LOG_NOTICE' undeclared (first use in this function)
#
if (signr != -1 ) do_log(LOG_NOTICE, "signalled, doing cleanup");
#
^
#
p3scan.c:2849:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (signr != -1 ) do_log(LOG_NOTICE, "signalled, doing cleanup");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2852:14: error: 'LOG_DEBUG' undeclared (first use in this function)
#
do_log(LOG_DEBUG, "calling uninit1");
#
^
#
p3scan.c:2852:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "calling uninit1");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2854:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "uninit1 done");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2856:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if((ret=unlink(config->pidfile)!=0)) do_log(LOG_NOTICE, "ERR: Unable to remove %s", config->pidfile);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2857:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, PROGNAME " terminates now");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2858:4: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
#
exit(0);
#
^
#
p3scan.c: In function 'p3signal':
#
p3scan.c:2862:21: error: storage size of 'act' isn't known
#
struct sigaction act, oact;
#
^
#
p3scan.c:2862:26: error: storage size of 'oact' isn't known
#
struct sigaction act, oact;
#
^
#
p3scan.c:2864:7: error: request for member 'sa_handler' in something not a structure or union
#
act.sa_handler = func;
#
^
#
p3scan.c:2864:4: warning: statement with no effect [-Wunused-value]
#
act.sa_handler = func;
#
^
#
p3scan.c:2865:4: warning: implicit declaration of function 'sigemptyset' [-Wimplicit-function-declaration]
#
sigemptyset(&act.sa_mask);
#
^
#
p3scan.c:2865:20: error: request for member 'sa_mask' in something not a structure or union
#
sigemptyset(&act.sa_mask);
#
^
#
p3scan.c:2866:7: error: request for member 'sa_flags' in something not a structure or union
#
act.sa_flags = 0;
#
^
#
p3scan.c:2866:4: warning: statement with no effect [-Wunused-value]
#
act.sa_flags = 0;
#
^
#
p3scan.c:2867:16: error: 'SIGALRM' undeclared (first use in this function)
#
if(signo != SIGALRM) act.sa_flags |= SA_RESTART;
#
^
#
p3scan.c:2867:13: warning: comparison between pointer and integer [enabled by default]
#
if(signo != SIGALRM) act.sa_flags |= SA_RESTART;
#
^
#
p3scan.c:2867:28: error: request for member 'sa_flags' in something not a structure or union
#
if(signo != SIGALRM) act.sa_flags |= SA_RESTART;
#
^
#
p3scan.c:2867:41: error: 'SA_RESTART' undeclared (first use in this function)
#
if(signo != SIGALRM) act.sa_flags |= SA_RESTART;
#
^
#
p3scan.c:2867:25: warning: statement with no effect [-Wunused-value]
#
if(signo != SIGALRM) act.sa_flags |= SA_RESTART;
#
^
#
p3scan.c:2868:4: warning: implicit declaration of function 'sigaction' [-Wimplicit-function-declaration]
#
if(sigaction(signo, &act, &oact)<0) return(SIG_ERR);
#
^
#
p3scan.c:2868:47: error: 'SIG_ERR' undeclared (first use in this function)
#
if(sigaction(signo, &act, &oact)<0) return(SIG_ERR);
#
^
#
p3scan.c:2868:40: warning: return from incompatible pointer type [enabled by default]
#
if(sigaction(signo, &act, &oact)<0) return(SIG_ERR);
#
^
#
p3scan.c:2869:15: error: request for member 'sa_handler' in something not a structure or union
#
return(oact.sa_handler);
#
^
#
p3scan.c:2869:4: warning: return from incompatible pointer type [enabled by default]
#
return(oact.sa_handler);
#
^
#
p3scan.c:2862:26: warning: unused variable 'oact' [-Wunused-variable]
#
struct sigaction act, oact;
#
^
#
p3scan.c:2862:21: warning: unused variable 'act' [-Wunused-variable]
#
struct sigaction act, oact;
#
^
#
p3scan.c: In function 'main':
#
p3scan.c:2875:24: error: storage size of 'addr' isn't known
#
struct sockaddr_in addr;
#
^
#
p3scan.c:2876:4: error: unknown type name 'size_t'
#
size_t socksize = sizeof(struct sockaddr_in);
#
^
#
p3scan.c:2876:29: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_in'
#
size_t socksize = sizeof(struct sockaddr_in);
#
^
#
p3scan.c:2876:22: warning: initialization makes integer from pointer without a cast [enabled by default]
#
size_t socksize = sizeof(struct sockaddr_in);
#
^
#
p3scan.c:2877:4: error: unknown type name 'pid_t'
#
pid_t pid;
#
^
#
p3scan.c:2879:4: error: unknown type name 'FILE'
#
FILE * fp;
#
^
#
p3scan.c:2888:4: error: unknown type name 'FILE'
#
FILE * chowncmd;
#
^
#
p3scan.c:2890:19: error: storage size of 'fs' isn't known
#
struct statvfs fs;
#
^
#
p3scan.c:2896:11: error: 'LOG_NOTICE' undeclared (first use in this function)
#
do_log(LOG_NOTICE, PROGNAME " Version " VERSION);
#
^
#
p3scan.c:2896:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, PROGNAME " Version " VERSION);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2898:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
config->scanner->name,config->scanner->descr);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2900:22: error: 'PF_INET' undeclared (first use in this function)
#
if((sockfd=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP))<0) do_log(LOG_EMERG, "ERR: Can't open socket!");
#
^
#
p3scan.c:2900:30: error: 'SOCK_STREAM' undeclared (first use in this function)
#
if((sockfd=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP))<0) do_log(LOG_EMERG, "ERR: Can't open socket!");
#
^
#
p3scan.c:2900:42: error: 'IPPROTO_TCP' undeclared (first use in this function)
#
if((sockfd=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP))<0) do_log(LOG_EMERG, "ERR: Can't open socket!");
#
^
#
p3scan.c:2900:66: error: 'LOG_EMERG' undeclared (first use in this function)
#
if((sockfd=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP))<0) do_log(LOG_EMERG, "ERR: Can't open socket!");
#
^
#
p3scan.c:2900:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if((sockfd=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP))<0) do_log(LOG_EMERG, "ERR: Can't open socket!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2902:23: error: 'SOL_SOCKET' undeclared (first use in this function)
#
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &i, sizeof(i));
#
^
#
p3scan.c:2902:35: error: 'SO_REUSEADDR' undeclared (first use in this function)
#
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &i, sizeof(i));
#
^
#
p3scan.c:2903:16: error: request for member 'sin_family' in something not a structure or union
#
config->addr.sin_family = AF_INET;
#
^
#
p3scan.c:2903:30: error: 'AF_INET' undeclared (first use in this function)
#
config->addr.sin_family = AF_INET;
#
^
#
p3scan.c:2903:4: warning: statement with no effect [-Wunused-value]
#
config->addr.sin_family = AF_INET;
#
^
#
p3scan.c:2905:4: warning: implicit declaration of function 'bind' [-Wimplicit-function-declaration]
#
if (bind(sockfd, (struct sockaddr *) &config->addr, sizeof(config->addr))){
#
^
#
p3scan.c:2906:81: error: request for member 'sin_addr' in something not a structure or union
#
do_log(LOG_EMERG, "ERR: Can't bind to socket %s:%i",inet_ntoa(config->addr.sin_addr), ntohs(config->addr.sin_port));
#
^
#
p3scan.c:2906:111: error: request for member 'sin_port' in something not a structure or union
#
do_log(LOG_EMERG, "ERR: Can't bind to socket %s:%i",inet_ntoa(config->addr.sin_addr), ntohs(config->addr.sin_port));
#
^
#
p3scan.c:2906:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Can't bind to socket %s:%i",inet_ntoa(config->addr.sin_addr), ntohs(config->addr.sin_port));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2908:4: warning: implicit declaration of function 'listen' [-Wimplicit-function-declaration]
#
if (listen(sockfd, 5)) do_log(LOG_EMERG, "ERR: Can't listen on socket");
#
^
#
p3scan.c:2908:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2909:68: error: request for member 'sin_addr' in something not a structure or union
#
do_log(LOG_NOTICE, "Listen now on %s:%i", inet_ntoa(config->addr.sin_addr), ntohs(config->addr.sin_port));
#
^
#
p3scan.c:2909:98: error: request for member 'sin_port' in something not a structure or union
#
do_log(LOG_NOTICE, "Listen now on %s:%i", inet_ntoa(config->addr.sin_addr), ntohs(config->addr.sin_port));
#
^
#
p3scan.c:2909:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, "Listen now on %s:%i", inet_ntoa(config->addr.sin_addr), ntohs(config->addr.sin_port));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2912:7: warning: implicit declaration of function 'fork' [-Wimplicit-function-declaration]
#
if ((pid = fork())<0) return(-1);
#
^
#
p3scan.c:2913:25: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
#
else if(pid != 0) exit(0);
#
^
#
p3scan.c:2914:7: warning: implicit declaration of function 'setsid' [-Wimplicit-function-declaration]
#
setsid();
#
^
#
p3scan.c:2915:7: warning: implicit declaration of function 'chdir' [-Wimplicit-function-declaration]
#
if(chdir("/")) do_log(LOG_CRIT,"ERR: chdir");
#
^
#
p3scan.c:2915:29: error: 'LOG_CRIT' undeclared (first use in this function)
#
if(chdir("/")) do_log(LOG_CRIT,"ERR: chdir");
#
^
#
p3scan.c:2915:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(chdir("/")) do_log(LOG_CRIT,"ERR: chdir");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2916:7: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration]
#
umask(0);
#
^
#
p3scan.c:2918:4: warning: implicit declaration of function 'fopen' [-Wimplicit-function-declaration]
#
if ((fp=fopen(config->pidfile, "w+"))!=NULL){
#
^
#
p3scan.c:2918:11: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((fp=fopen(config->pidfile, "w+"))!=NULL){
#
^
#
p3scan.c:2918:41: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((fp=fopen(config->pidfile, "w+"))!=NULL){
#
^
#
p3scan.c:2919:7: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
#
fprintf(fp, "%i\n", getpid());
#
^
#
p3scan.c:2920:7: warning: implicit declaration of function 'fclose' [-Wimplicit-function-declaration]
#
fclose(fp);
#
^
#
p3scan.c:2921:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
}else do_log(LOG_CRIT, "ERR: Can't write PID to %s", PID_FILE);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2922:8: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
#
len=strlen(CHOWNCMD)+1+strlen(config->runasuser)+1+strlen(config->runasuser)+1+strlen(config->pidfile)+1;
#
^
#
p3scan.c:2923:4: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
#
snprintf(chownit, len, "%s %s:%s %s", CHOWNCMD, config->runasuser, config->runasuser, config->pidfile);
#
^
#
p3scan.c:2924:17: warning: assignment makes pointer from integer without a cast [enabled by default]
#
if ((chowncmd=popen(chownit, "r"))==NULL){
#
^
#
p3scan.c:2924:38: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if ((chowncmd=popen(chownit, "r"))==NULL){
#
^
#
p3scan.c:2925:14: error: 'LOG_ALERT' undeclared (first use in this function)
#
do_log(LOG_ALERT, "ERR: Can't '%s' !!!", chowncmd);
#
^
#
p3scan.c:2925:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_ALERT, "ERR: Can't '%s' !!!", chowncmd);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2929:4: warning: implicit declaration of function 'getuid' [-Wimplicit-function-declaration]
#
cuid=getuid();
#
^
#
p3scan.c:2931:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, "Changing uid (we are root)");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2932:7: warning: implicit declaration of function 'getpwnam' [-Wimplicit-function-declaration]
#
pws = getpwnam(config->runasuser);
#
^
#
p3scan.c:2932:11: warning: assignment makes pointer from integer without a cast [enabled by default]
#
pws = getpwnam(config->runasuser);
#
^
#
p3scan.c:2933:15: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
if (pws == NULL) do_log(LOG_EMERG,"ERR: Unknown User '%s'",config->runasuser);
#
^
#
p3scan.c:2933:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (pws == NULL) do_log(LOG_EMERG,"ERR: Unknown User '%s'",config->runasuser);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2934:7: warning: implicit declaration of function 'setuid' [-Wimplicit-function-declaration]
#
setuid(pws->pw_uid);
#
^
#
p3scan.c:2934:17: error: dereferencing pointer to incomplete type
#
setuid(pws->pw_uid);
#
^
#
p3scan.c:2934:17: error: request for member 'pw_uid' in something not a structure or union
#
p3scan.c:2937:4: warning: implicit declaration of function 'getpwuid' [-Wimplicit-function-declaration]
#
pws = getpwuid(cuid);
#
^
#
p3scan.c:2937:8: warning: assignment makes pointer from integer without a cast [enabled by default]
#
pws = getpwuid(cuid);
#
^
#
p3scan.c:2938:48: error: dereferencing pointer to incomplete type
#
do_log(LOG_NOTICE, "Running as user: %s",pws->pw_name);
#
^
#
p3scan.c:2938:48: error: request for member 'pw_name' in something not a structure or union
#
p3scan.c:2938:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, "Running as user: %s",pws->pw_name);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2939:17: error: 'SIGCHLD' undeclared (first use in this function)
#
if (p3signal(SIGCHLD, do_sigchld)<0) do_log(LOG_EMERG, "ERR: Could not set signal handler SIGCHLD");
#
^
#
p3scan.c:2939:4: warning: passing argument 1 of 'p3signal' makes integer from pointer without a cast [enabled by default]
#
if (p3signal(SIGCHLD, do_sigchld)<0) do_log(LOG_EMERG, "ERR: Could not set signal handler SIGCHLD");
#
^
#
p3scan.c:2861:11: note: expected 'int' but argument is of type 'struct scanner_t **'
#
Sigfunc * p3signal(int signo, Sigfunc *func){
#
^
#
p3scan.c:2939:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (p3signal(SIGCHLD, do_sigchld)<0) do_log(LOG_EMERG, "ERR: Could not set signal handler SIGCHLD");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2940:17: error: 'SIGTERM' undeclared (first use in this function)
#
if (p3signal(SIGTERM, do_sigterm_main)<0) do_log(LOG_EMERG, "ERR: Could not set signal handler SIGTERM main");
#
^
#
p3scan.c:2940:4: warning: passing argument 1 of 'p3signal' makes integer from pointer without a cast [enabled by default]
#
if (p3signal(SIGTERM, do_sigterm_main)<0) do_log(LOG_EMERG, "ERR: Could not set signal handler SIGTERM main");
#
^
#
p3scan.c:2861:11: note: expected 'int' but argument is of type 'struct scanner_t **'
#
Sigfunc * p3signal(int signo, Sigfunc *func){
#
^
#
p3scan.c:2940:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (p3signal(SIGTERM, do_sigterm_main)<0) do_log(LOG_EMERG, "ERR: Could not set signal handler SIGTERM main");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2941:17: error: 'SIGINT' undeclared (first use in this function)
#
if (p3signal(SIGINT, do_sigterm_main)<0) do_log(LOG_EMERG, "ERR: Could not set signal handler SIGINT main");
#
^
#
p3scan.c:2941:4: warning: passing argument 1 of 'p3signal' makes integer from pointer without a cast [enabled by default]
#
if (p3signal(SIGINT, do_sigterm_main)<0) do_log(LOG_EMERG, "ERR: Could not set signal handler SIGINT main");
#
^
#
p3scan.c:2861:11: note: expected 'int' but argument is of type 'struct scanner_t **'
#
Sigfunc * p3signal(int signo, Sigfunc *func){
#
^
#
p3scan.c:2941:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (p3signal(SIGINT, do_sigterm_main)<0) do_log(LOG_EMERG, "ERR: Could not set signal handler SIGINT main");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2944:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_CRIT, "ERR: Scanner init failed! Check config and restart " PROGNAME);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2950:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, "%s %s started.", PROGNAME, VERSION);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2954:14: error: 'LOG_DEBUG' undeclared (first use in this function)
#
do_log(LOG_DEBUG,"p3scan.conf:");
#
^
#
p3scan.c:2954:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"p3scan.conf:");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2955:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"pidfile: %s",config->pidfile);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2956:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"maxchilds: %i",config->maxchilds);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2957:30: error: request for member 'sin_addr' in something not a structure or union
#
if (!ntohs(config->addr.sin_addr.s_addr)){
#
^
#
p3scan.c:2957:39: error: request for member 's_addr' in something not a structure or union
#
if (!ntohs(config->addr.sin_addr.s_addr)){
#
^
#
p3scan.c:2958:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"ip: Any");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2959:58: error: request for member 'sin_addr' in something not a structure or union
#
} else do_log(LOG_DEBUG,"ip: %i",ntohs(config->addr.sin_addr.s_addr));
#
^
#
p3scan.c:2959:67: error: request for member 's_addr' in something not a structure or union
#
} else do_log(LOG_DEBUG,"ip: %i",ntohs(config->addr.sin_addr.s_addr));
#
^
#
p3scan.c:2959:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
} else do_log(LOG_DEBUG,"ip: %i",ntohs(config->addr.sin_addr.s_addr));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2960:53: error: request for member 'sin_port' in something not a structure or union
#
do_log(LOG_DEBUG,"port: %d",htons(config->addr.sin_port));
#
^
#
p3scan.c:2960:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"port: %d",htons(config->addr.sin_port));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2961:17: error: 'INADDR_ANY' undeclared (first use in this function)
#
if (htonl(INADDR_ANY) == (config->targetaddr.sin_addr.s_addr)) do_log(LOG_DEBUG,"targetip/port disabled");
#
^
#
p3scan.c:2961:51: error: request for member 'sin_addr' in something not a structure or union
#
if (htonl(INADDR_ANY) == (config->targetaddr.sin_addr.s_addr)) do_log(LOG_DEBUG,"targetip/port disabled");
#
^
#
p3scan.c:2961:60: error: request for member 's_addr' in something not a structure or union
#
if (htonl(INADDR_ANY) == (config->targetaddr.sin_addr.s_addr)) do_log(LOG_DEBUG,"targetip/port disabled");
#
^
#
p3scan.c:2961:29: warning: comparison between pointer and integer [enabled by default]
#
if (htonl(INADDR_ANY) == (config->targetaddr.sin_addr.s_addr)) do_log(LOG_DEBUG,"targetip/port disabled");
#
^
#
p3scan.c:2961:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (htonl(INADDR_ANY) == (config->targetaddr.sin_addr.s_addr)) do_log(LOG_DEBUG,"targetip/port disabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2963:66: error: request for member 'sin_addr' in something not a structure or union
#
do_log(LOG_DEBUG,"targetip: %i",ntohs(config->targetaddr.sin_addr.s_addr));
#
^
#
p3scan.c:2963:75: error: request for member 's_addr' in something not a structure or union
#
do_log(LOG_DEBUG,"targetip: %i",ntohs(config->targetaddr.sin_addr.s_addr));
#
^
#
p3scan.c:2963:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"targetip: %i",ntohs(config->targetaddr.sin_addr.s_addr));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2964:68: error: request for member 'sin_port' in something not a structure or union
#
do_log(LOG_DEBUG,"targetport: %d",htons(config->targetaddr.sin_port));
#
^
#
p3scan.c:2964:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"targetport: %d",htons(config->targetaddr.sin_port));
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2966:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"user: %s",config->runasuser);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2967:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"notifydir: %s",config->notifydir);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2968:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"virusdir: %s",config->virusdir);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2969:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(config->delit) do_log(LOG_DEBUG,"justdelete: enabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2970:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
else do_log(LOG_DEBUG,"justdelete: disabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2971:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"bytesfree: %lu",config->freespace);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2973:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(config->demime) do_log(LOG_DEBUG,"demime: enabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2974:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
else do_log(LOG_DEBUG,"demime: disabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:2978:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->virusscanner))) do_log(LOG_DEBUG,"scanner: %s",config->virusscanner);
#
^
#
p3scan.c:2978:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->virusscanner))) do_log(LOG_DEBUG,"scanner: %s",config->virusscanner);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:2979:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->virusregexp))) do_log(LOG_DEBUG,"virusregexp: %s",config->virusregexp);
#
^
#
p3scan.c:2979:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->virusregexp))) do_log(LOG_DEBUG,"virusregexp: %s",config->virusregexp);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2980:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(config->broken) do_log(LOG_DEBUG,"broken: enabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2981:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
else do_log(LOG_DEBUG,"broken: disabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2982:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(config->checkspam) do_log(LOG_DEBUG,"checkspam: enabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2983:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
else do_log(LOG_DEBUG, "checkspam: disabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:2984:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->spamcheck))) do_log(LOG_DEBUG,"spamcheck: %s",config->spamcheck);
#
^
#
p3scan.c:2984:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->spamcheck))) do_log(LOG_DEBUG,"spamcheck: %s",config->spamcheck);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:2985:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->renattach))) do_log(LOG_DEBUG,"renattach: %s",config->renattach);
#
^
#
p3scan.c:2985:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->renattach))) do_log(LOG_DEBUG,"renattach: %s",config->renattach);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:2986:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->overwrite))) do_log(LOG_DEBUG,"overwrite: %s",config->overwrite);
#
^
#
p3scan.c:2986:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->overwrite))) do_log(LOG_DEBUG,"overwrite: %s",config->overwrite);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2987:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"debug: enabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2988:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(config->quiet) do_log(LOG_DEBUG,"quiet: enabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2989:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
else do_log(LOG_DEBUG,"quiet: disabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:2990:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->virustemplate))) do_log(LOG_DEBUG,"template: %s",config->virustemplate);
#
^
#
p3scan.c:2990:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->virustemplate))) do_log(LOG_DEBUG,"template: %s",config->virustemplate);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:2991:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->subject))) do_log(LOG_DEBUG,"subject: %s",config->subject);
#
^
#
p3scan.c:2991:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->subject))) do_log(LOG_DEBUG,"subject: %s",config->subject);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:2992:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->notify))) do_log(LOG_DEBUG,"notify: %s",config->notify);
#
^
#
p3scan.c:2992:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->notify))) do_log(LOG_DEBUG,"notify: %s",config->notify);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:2993:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->extra))) do_log(LOG_DEBUG,"extra: %s",config->extra);
#
^
#
p3scan.c:2993:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->extra))) do_log(LOG_DEBUG,"extra: %s",config->extra);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2994:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"emailport: %i",config->smtpport);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:2995:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->smtprset))) do_log(LOG_DEBUG,"smtprset: %s",config->smtprset);
#
^
#
p3scan.c:2995:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->smtprset))) do_log(LOG_DEBUG,"smtprset: %s",config->smtprset);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2996:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(config->smtpsize) do_log(LOG_DEBUG,"smtpsize: %i",config->smtpsize);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2997:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
else do_log(LOG_DEBUG,"smtpsize: not checking.");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2998:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"sslport: %i",config->sslport);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:2999:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->mail))) do_log(LOG_DEBUG,"mail: %s",config->mail);
#
^
#
p3scan.c:2999:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->mail))) do_log(LOG_DEBUG,"mail: %s",config->mail);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3000:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"timeout: %i",config->timeout);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:3001:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->footer))) do_log(LOG_DEBUG,"footer: %s",config->footer);
#
^
#
p3scan.c:3001:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->footer))) do_log(LOG_DEBUG,"footer: %s",config->footer);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3002:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(config->altemail) do_log(LOG_DEBUG,"altvnmsg: enabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3003:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
else do_log(LOG_DEBUG,"altvnmsg: disabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3004:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(config->useurl) do_log(LOG_DEBUG,"useurl: enabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3005:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
else do_log(LOG_DEBUG,"useurl: disabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
In file included from p3scan.c:75:0:
#
p3scan.h:87:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
#
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
#
^
#
p3scan.c:3006:17: note: in expansion of macro 'NONULL'
#
if(strlen(NONULL(config->emergcon))) do_log(LOG_DEBUG,"emergcon: %s",config->emergcon);
#
^
#
p3scan.c:3006:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if(strlen(NONULL(config->emergcon))) do_log(LOG_DEBUG,"emergcon: %s",config->emergcon);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3007:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
if (config->enabletop) do_log(LOG_DEBUG,"TOP processing enabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3008:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
else do_log(LOG_DEBUG,"TOP processing disabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3009:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"PIPELINING processing disabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3010:7: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"STLS processing disabled");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3013:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Waiting for connections.....");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3014:4: warning: implicit declaration of function 'accept' [-Wimplicit-function-declaration]
#
while ((connfd = accept(sockfd, (struct sockaddr *)&addr,&socksize)) >= 0){
#
^
#
p3scan.c:3015:35: error: 'O_RDONLY' undeclared (first use in this function)
#
if ((abortfd=open(ABORTFILE,O_RDONLY))>=0){
#
^
#
p3scan.c:3016:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG,"Aloha No Ka ko");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3020:10: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
#
exit(1);
#
^
#
p3scan.c:3025:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Forked, pid=%i, numprocs=%i", pid, numprocs);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3030:20: error: 'LOG_WARNING' undeclared (first use in this function)
#
do_log(LOG_WARNING, "MAX_CHILDS (%i) reached!", config->maxchilds);
#
^
#
p3scan.c:3030:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_WARNING, "MAX_CHILDS (%i) reached!", config->maxchilds);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3041:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Unable to get available space!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3044:16: error: request for member 'f_bsize' in something not a structure or union
#
if (fs.f_bsize==1024) kbfree=fs.f_bavail;
#
^
#
p3scan.c:3044:24: warning: comparison between pointer and integer [enabled by default]
#
if (fs.f_bsize==1024) kbfree=fs.f_bavail;
#
^
#
p3scan.c:3044:41: error: request for member 'f_bavail' in something not a structure or union
#
if (fs.f_bsize==1024) kbfree=fs.f_bavail;
#
^
#
p3scan.c:3044:38: warning: assignment makes integer from pointer without a cast [enabled by default]
#
if (fs.f_bsize==1024) kbfree=fs.f_bavail;
#
^
#
p3scan.c:3045:24: error: request for member 'f_bsize' in something not a structure or union
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:3045:38: error: request for member 'f_bavail' in something not a structure or union
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:3045:48: error: invalid operands to binary / (have 'struct scanner_t **' and 'int')
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:3045:33: error: invalid operands to binary * (have 'struct scanner_t **' and 'struct scanner_t **')
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:3045:60: error: request for member 'f_bavail' in something not a structure or union
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:3045:69: error: invalid operands to binary % (have 'struct scanner_t **' and 'int')
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:3045:79: error: request for member 'f_bsize' in something not a structure or union
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:3045:75: error: invalid operands to binary * (have 'struct scanner_t **' and 'struct scanner_t **')
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:3045:88: error: invalid operands to binary / (have 'struct scanner_t **' and 'int')
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:3045:56: error: invalid operands to binary + (have 'struct scanner_t **' and 'struct scanner_t **')
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:3045:21: warning: assignment makes integer from pointer without a cast [enabled by default]
#
else kbfree=fs.f_bsize * (fs.f_bavail / 1024) + fs.f_bavail%1024 * fs.f_bsize / 1024;
#
^
#
p3scan.c:3048:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Not enough space! Available space: %lu", kbfree);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3050:13: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
#
exit(0);
#
^
#
p3scan.c:3054:26: warning: assignment makes pointer from integer without a cast [enabled by default]
#
config->virusdir=w_malloc(virusdirlen);
#
^
#
p3scan.c:3056:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "setting the virusdir to %s", config->virusdir);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3058:10: warning: implicit declaration of function 'clean_child_directory' [-Wimplicit-function-declaration]
#
if(clean_child_directory(getpid())){
#
^
#
p3scan.c:3060:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Error calling clean child directory!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3062:39: error: 'S_IRWXU' undeclared (first use in this function)
#
if((mkdir (config->virusdir, S_IRWXU)<0)){
#
^
#
p3scan.c:3064:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG,"ERR: Could not create virusdir %s",config->virusdir);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3066:10: warning: passing argument 1 of 'p3signal' makes integer from pointer without a cast [enabled by default]
#
if (p3signal(SIGCHLD, NULL)<0) {
#
^
#
p3scan.c:2861:11: note: expected 'int' but argument is of type 'struct scanner_t **'
#
Sigfunc * p3signal(int signo, Sigfunc *func){
#
^
#
p3scan.c:3066:10: warning: passing argument 2 of 'p3signal' from incompatible pointer type [enabled by default]
#
if (p3signal(SIGCHLD, NULL)<0) {
#
^
#
p3scan.c:2861:11: note: expected 'void (*)(int)' but argument is of type 'struct scanner_t **'
#
Sigfunc * p3signal(int signo, Sigfunc *func){
#
^
#
p3scan.c:3068:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Could not set signal handler SIGCHLD NULL"); /* unset signal handler for child */
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3070:23: error: 'SIGPIPE' undeclared (first use in this function)
#
if (p3signal(SIGPIPE, SIG_IGN)<0) {
#
^
#
p3scan.c:3070:32: error: 'SIG_IGN' undeclared (first use in this function)
#
if (p3signal(SIGPIPE, SIG_IGN)<0) {
#
^
#
p3scan.c:3070:10: warning: passing argument 1 of 'p3signal' makes integer from pointer without a cast [enabled by default]
#
if (p3signal(SIGPIPE, SIG_IGN)<0) {
#
^
#
p3scan.c:2861:11: note: expected 'int' but argument is of type 'struct scanner_t **'
#
Sigfunc * p3signal(int signo, Sigfunc *func){
#
^
#
p3scan.c:3070:10: warning: passing argument 2 of 'p3signal' from incompatible pointer type [enabled by default]
#
if (p3signal(SIGPIPE, SIG_IGN)<0) {
#
^
#
p3scan.c:2861:11: note: expected 'void (*)(int)' but argument is of type 'struct scanner_t **'
#
Sigfunc * p3signal(int signo, Sigfunc *func){
#
^
#
p3scan.c:3072:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Could not set signal handler SIGPIPE"); /* don't die on SIGPIPE */
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3074:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "Initialize Context");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3077:10: warning: statement with no effect [-Wunused-value]
#
p->client_addr=addr;
#
^
#
p3scan.c:3079:10: warning: passing argument 1 of 'p3signal' makes integer from pointer without a cast [enabled by default]
#
if (p3signal(SIGTERM, do_sigterm_proxy)<0) {
#
^
#
p3scan.c:2861:11: note: expected 'int' but argument is of type 'struct scanner_t **'
#
Sigfunc * p3signal(int signo, Sigfunc *func){
#
^
#
p3scan.c:3081:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Could not set signal handler SIGTERM child");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3083:10: warning: passing argument 1 of 'p3signal' makes integer from pointer without a cast [enabled by default]
#
if (p3signal(SIGINT, do_sigterm_proxy)<0) {
#
^
#
p3scan.c:2861:11: note: expected 'int' but argument is of type 'struct scanner_t **'
#
Sigfunc * p3signal(int signo, Sigfunc *func){
#
^
#
p3scan.c:3085:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_EMERG, "ERR: Could not set signal handler SIGINT child");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3087:10: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_DEBUG, "starting proxy");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3090:25: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
#
responsemsg=strdup("Critical abort");
#
^
#
p3scan.c:3091:28: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
#
}else responsemsg=strdup("Clean Exit");
#
^
#
p3scan.c:3095:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
responsemsg, p->mailcount, p->bytecount);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3098:13: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
responsemsg, p->mailcount);
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:3101:10: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]
#
free(responsemsg);
#
^
#
p3scan.c:3103:10: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
#
exit(0);
#
^
#
p3scan.c:3106:4: warning: passing argument 1 of 'do_log' makes integer from pointer without a cast [enabled by default]
#
do_log(LOG_NOTICE, "ERR: Accept error - Should not have reached here!");
#
^
#
p3scan.c:141:6: note: expected 'int' but argument is of type 'struct scanner_t **'
#
void do_log(int level, const char *fmt,...){
#
^
#
p3scan.c:2890:19: warning: unused variable 'fs' [-Wunused-variable]
#
struct statvfs fs;
#
^
#
p3scan.c:2887:8: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
#
int ret=0;
#
^
#
p3scan.c:2875:24: warning: unused variable 'addr' [-Wunused-variable]
#
struct sockaddr_in addr;
#
^
#
p3scan.c: At top level:
#
p3scan.c:114:12: warning: 'stralloc_ptr' defined but not used [-Wunused-variable]
#
static int stralloc_ptr;
#
^
#
p3scan.c:115:14: warning: 'strings' defined but not used [-Wunused-variable]
#
static char *strings[8];
#
^
#
p3scan.c:116:12: warning: 'str_tag' defined but not used [-Wunused-variable]
#
static int str_tag[8];
#
^
#
p3scan.c:117:13: warning: 'smtpstr' defined but not used [-Wunused-variable]
#
static char smtpstr[LEN];
#
^
#
make: *** [Makefile:83: p3scan.o] Error 1
#
==> ERROR: A failure occurred in build().
#
Aborting...