fixed minor inconsistencies, reenabled warnings

This commit is contained in:
Dominik Maier
2020-08-10 19:04:51 +02:00
parent fb84103ffb
commit a422fcaa40
5 changed files with 12 additions and 9 deletions

View File

@ -98,7 +98,7 @@ ifneq "$(shell uname -m)" "x86_64"
endif endif
CFLAGS ?= -O3 -funroll-loops $(CFLAGS_OPT) CFLAGS ?= -O3 -funroll-loops $(CFLAGS_OPT)
override CFLAGS += -g -Wno-pointer-sign \ override CFLAGS += -g -Wno-pointer-sign -Wno-variadic-macros -Wall -Wextra -Wpointer-arith \
-I include/ -DAFL_PATH=\"$(HELPER_PATH)\" \ -I include/ -DAFL_PATH=\"$(HELPER_PATH)\" \
-DBIN_PATH=\"$(BIN_PATH)\" -DDOC_PATH=\"$(DOC_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" -DDOC_PATH=\"$(DOC_PATH)\"
@ -198,6 +198,7 @@ else
endif endif
ifneq "$(filter Linux GNU%,$(shell uname))" "" ifneq "$(filter Linux GNU%,$(shell uname))" ""
override CFLAGS += -D_FORTIFY_SOURCE=2
LDFLAGS += -ldl -lrt LDFLAGS += -ldl -lrt
endif endif

View File

@ -29,9 +29,14 @@
#include "config.h" #include "config.h"
/* __FUNCTION__ is non-iso */ /* __FUNCTION__ is non-iso */
#ifndef __FUNCTION__
#ifdef __func__ #ifdef __func__
#define __FUNCTION__ __func__ #define __FUNCTION__ __func__
#else
#define __FUNCTION__ "unknown_func"
#endif #endif
#endif
/******************* /*******************
* Terminal colors * * Terminal colors *

View File

@ -29,10 +29,6 @@
#include "afl-fuzz.h" #include "afl-fuzz.h"
#include "cmplog.h" #include "cmplog.h"
typedef struct cmplog_data {
} cmplog_data_t;
void cmplog_exec_child(afl_forkserver_t *fsrv, char **argv) { void cmplog_exec_child(afl_forkserver_t *fsrv, char **argv) {
setenv("___AFL_EINS_ZWEI_POLIZEI___", "1", 1); setenv("___AFL_EINS_ZWEI_POLIZEI___", "1", 1);

View File

@ -138,7 +138,7 @@ void write_to_testcase(afl_state_t *afl, void *mem, u32 len) {
/* The same, but with an adjustable gap. Used for trimming. */ /* The same, but with an adjustable gap. Used for trimming. */
static void write_with_gap(afl_state_t *afl, void *mem, u32 len, u32 skip_at, static void write_with_gap(afl_state_t *afl, u8 *mem, u32 len, u32 skip_at,
u32 skip_len) { u32 skip_len) {
s32 fd = afl->fsrv.out_fd; s32 fd = afl->fsrv.out_fd;

View File

@ -289,8 +289,9 @@ int main(int argc, char **argv_orig, char **envp) {
if (afl->cpu_to_bind != -1) FATAL("Multiple -b options not supported"); if (afl->cpu_to_bind != -1) FATAL("Multiple -b options not supported");
if (sscanf(optarg, "%u", &afl->cpu_to_bind) < 0 || optarg[0] == '-') if (sscanf(optarg, "%d", &afl->cpu_to_bind) < 0) {
FATAL("Bad syntax used for -b"); FATAL("Bad syntax used for -b");
}
break; break;