From 26f8708fede1b15e6a93709d0baa2e5f481e082d Mon Sep 17 00:00:00 2001 From: van Hauser Date: Sun, 10 May 2020 11:35:31 +0200 Subject: fix warning, code format --- examples/afl_network_proxy/afl-network-client.c | 12 ++++++------ examples/afl_network_proxy/afl-network-server.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'examples/afl_network_proxy') diff --git a/examples/afl_network_proxy/afl-network-client.c b/examples/afl_network_proxy/afl-network-client.c index cf09b2ad..fca2a9f1 100644 --- a/examples/afl_network_proxy/afl-network-client.c +++ b/examples/afl_network_proxy/afl-network-client.c @@ -15,7 +15,7 @@ */ #ifdef __ANDROID__ -#include "android-ashmem.h" +# include "android-ashmem.h" #endif #include "config.h" #include "types.h" @@ -42,7 +42,7 @@ #include #ifdef USE_DEFLATE -#include +# include #endif u8 *__afl_area_ptr; @@ -321,7 +321,7 @@ int main(int argc, char *argv[]) { // fprintf(stderr, "Sending testcase with len %u\n", *lenptr); #ifdef USE_DEFLATE -#ifdef COMPRESS_TESTCASES +# ifdef COMPRESS_TESTCASES // we only compress the testcase if it does not fit in the TCP packet if (*lenptr > 1500 - 20 - 32 - 4) { @@ -341,17 +341,17 @@ int main(int argc, char *argv[]) { } else { -#endif +# endif #endif if (send(s, buf, *lenptr + 4, 0) != *lenptr + 4) PFATAL("sending test data failed"); #ifdef USE_DEFLATE -#ifdef COMPRESS_TESTCASES +# ifdef COMPRESS_TESTCASES // fprintf(stderr, "unCOMPRESS (%u)\n", *lenptr); } -#endif +# endif #endif received = 0; diff --git a/examples/afl_network_proxy/afl-network-server.c b/examples/afl_network_proxy/afl-network-server.c index 2de91cbd..7d97e2db 100644 --- a/examples/afl_network_proxy/afl-network-server.c +++ b/examples/afl_network_proxy/afl-network-server.c @@ -25,7 +25,7 @@ #define AFL_MAIN #ifdef __ANDROID__ -#include "android-ashmem.h" +# include "android-ashmem.h" #endif #include "config.h" @@ -62,7 +62,7 @@ #include #ifdef USE_DEFLATE -#include +# include struct libdeflate_compressor * compressor; struct libdeflate_decompressor *decompressor; #endif -- cgit v1.2.3 From 30bfd44dfd9f442d5514a7100d76d1fd3d9deb74 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Sun, 10 May 2020 12:09:37 +0200 Subject: indenting preprocessor directives breaks compilation and cant be fixed, reverting ... :-( --- examples/afl_network_proxy/afl-network-client.c | 12 ++++++------ examples/afl_network_proxy/afl-network-server.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'examples/afl_network_proxy') diff --git a/examples/afl_network_proxy/afl-network-client.c b/examples/afl_network_proxy/afl-network-client.c index fca2a9f1..cf09b2ad 100644 --- a/examples/afl_network_proxy/afl-network-client.c +++ b/examples/afl_network_proxy/afl-network-client.c @@ -15,7 +15,7 @@ */ #ifdef __ANDROID__ -# include "android-ashmem.h" +#include "android-ashmem.h" #endif #include "config.h" #include "types.h" @@ -42,7 +42,7 @@ #include #ifdef USE_DEFLATE -# include +#include #endif u8 *__afl_area_ptr; @@ -321,7 +321,7 @@ int main(int argc, char *argv[]) { // fprintf(stderr, "Sending testcase with len %u\n", *lenptr); #ifdef USE_DEFLATE -# ifdef COMPRESS_TESTCASES +#ifdef COMPRESS_TESTCASES // we only compress the testcase if it does not fit in the TCP packet if (*lenptr > 1500 - 20 - 32 - 4) { @@ -341,17 +341,17 @@ int main(int argc, char *argv[]) { } else { -# endif +#endif #endif if (send(s, buf, *lenptr + 4, 0) != *lenptr + 4) PFATAL("sending test data failed"); #ifdef USE_DEFLATE -# ifdef COMPRESS_TESTCASES +#ifdef COMPRESS_TESTCASES // fprintf(stderr, "unCOMPRESS (%u)\n", *lenptr); } -# endif +#endif #endif received = 0; diff --git a/examples/afl_network_proxy/afl-network-server.c b/examples/afl_network_proxy/afl-network-server.c index 7d97e2db..2de91cbd 100644 --- a/examples/afl_network_proxy/afl-network-server.c +++ b/examples/afl_network_proxy/afl-network-server.c @@ -25,7 +25,7 @@ #define AFL_MAIN #ifdef __ANDROID__ -# include "android-ashmem.h" +#include "android-ashmem.h" #endif #include "config.h" @@ -62,7 +62,7 @@ #include #ifdef USE_DEFLATE -# include +#include struct libdeflate_compressor * compressor; struct libdeflate_decompressor *decompressor; #endif -- cgit v1.2.3 From 845522f59b3a040a6c8bc9ef20920802752edb03 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Mon, 11 May 2020 13:34:57 +0200 Subject: remove warnings --- examples/afl_network_proxy/afl-network-server.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/afl_network_proxy') diff --git a/examples/afl_network_proxy/afl-network-server.c b/examples/afl_network_proxy/afl-network-server.c index 2de91cbd..59064b2c 100644 --- a/examples/afl_network_proxy/afl-network-server.c +++ b/examples/afl_network_proxy/afl-network-server.c @@ -142,6 +142,8 @@ static u8 run_target(afl_forkserver_t *fsrv, char **argv, u8 *mem, u32 len, } + return ret; + } /* Handle Ctrl-C and the like. */ @@ -665,7 +667,7 @@ int main(int argc, char **argv_orig, char **envp) { while ((in_len = recv_testcase(s, (void **)&in_data, &max_len)) > 0) { // fprintf(stderr, "received %u\n", in_len); - run_target(fsrv, use_argv, in_data, in_len, 1); + (void)run_target(fsrv, use_argv, in_data, in_len, 1); memcpy(send_buf + 4, fsrv->trace_bits, fsrv->map_size); -- cgit v1.2.3 From 30a675ab875d2f9ef971324a154fb4f46cebc122 Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Mon, 11 May 2020 14:40:42 +0200 Subject: silened warnings --- examples/afl_network_proxy/GNUmakefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'examples/afl_network_proxy') diff --git a/examples/afl_network_proxy/GNUmakefile b/examples/afl_network_proxy/GNUmakefile index cf1cbad5..25a3df82 100644 --- a/examples/afl_network_proxy/GNUmakefile +++ b/examples/afl_network_proxy/GNUmakefile @@ -6,6 +6,8 @@ PROGRAMS = afl-network-client afl-network-server HASH=\# +CFLAGS += -Wno-pointer-sign + ifdef STATIC CFLAGS += -static endif -- cgit v1.2.3