diff options
-rw-r--r-- | apf_defs.h | 2 | ||||
-rwxr-xr-x | devtools/mk | 2 | ||||
-rw-r--r-- | v5/apf_interpreter.c | 4 | ||||
-rw-r--r-- | v5/apf_interpreter_source.c | 2 |
4 files changed, 6 insertions, 4 deletions
@@ -10,7 +10,7 @@ typedef enum { error_program = -2, error_packet = -1, nomatch = false, - match = true, + match = true } match_result_type; #define ETH_P_IP 0x0800 diff --git a/devtools/mk b/devtools/mk index 619aa18..408cc0f 100755 --- a/devtools/mk +++ b/devtools/mk @@ -9,6 +9,7 @@ cd "${0%/*}" declare -ar FLAGS=( '-std=c89' + '-pedantic' '-Wall' '-Werror' '-Werror=implicit-fallthrough' @@ -19,6 +20,7 @@ declare -ar FLAGS=( '-Wuninitialized' '-Os' '-fomit-frame-pointer' + '-Wno-declaration-after-statement' ) arm-linux-gnueabi-gcc "${FLAGS[@]}" apf_interpreter.c -c -o apf_interpreter.arm.o diff --git a/v5/apf_interpreter.c b/v5/apf_interpreter.c index e6be8e0..06af66d 100644 --- a/v5/apf_interpreter.c +++ b/v5/apf_interpreter.c @@ -39,7 +39,7 @@ typedef enum { error_program = -2, error_packet = -1, nomatch = False, - match = True, + match = True } match_result_type; #define ETH_P_IP 0x0800 @@ -1055,7 +1055,7 @@ int apf_run(void* ctx, u32* const program, const u32 program_len, /* This cannot wrap due to previous check. */ if (program_len + 20 > ram_len) return PASS_PACKET; - apf_context apf_ctx = {}; + apf_context apf_ctx = { 0 }; apf_ctx.caller_ctx = ctx; apf_ctx.program = (u8*)program; apf_ctx.program_len = program_len; diff --git a/v5/apf_interpreter_source.c b/v5/apf_interpreter_source.c index 4515310..9740a18 100644 --- a/v5/apf_interpreter_source.c +++ b/v5/apf_interpreter_source.c @@ -525,7 +525,7 @@ int apf_run(void* ctx, u32* const program, const u32 program_len, // This cannot wrap due to previous check. if (program_len + 20 > ram_len) return PASS_PACKET; - apf_context apf_ctx = {}; + apf_context apf_ctx = { 0 }; apf_ctx.caller_ctx = ctx; apf_ctx.program = (u8*)program; apf_ctx.program_len = program_len; |