diff --git a/Makefile.include b/Makefile.include index 146ab78581..4be97ec5ca 100644 --- a/Makefile.include +++ b/Makefile.include @@ -123,7 +123,13 @@ endif WERROR ?= 1 export WERROR ifeq ($(WERROR),1) - CFLAGS += -Werror + CFLAGS += -Wall -Werror -Wextra +endif + +WPEDANTIC ?= 0 +export WPEDANTIC +ifeq ($(WPEDANTIC),1) + CFLAGS += -Wpedantic -pedantic-errors endif ifneq (10,$(if ${RIOT_VERSION},1,0)$(if ${__RIOTBUILD_FLAG},1,0)) diff --git a/drivers/nrf24l01p/nrf24l01p.c b/drivers/nrf24l01p/nrf24l01p.c index 7d2dba8709..f8ecf5d66f 100644 --- a/drivers/nrf24l01p/nrf24l01p.c +++ b/drivers/nrf24l01p/nrf24l01p.c @@ -354,10 +354,6 @@ int nrf24l01p_set_payload_width(const nrf24l01p_t *dev, return -1; } - if (width == 0) { - return -1; - } - if (width > 32) { width = 32; } diff --git a/tests/trickle/main.c b/tests/trickle/main.c index 4a90e94aa5..cf3cf2a9aa 100644 --- a/tests/trickle/main.c +++ b/tests/trickle/main.c @@ -53,16 +53,14 @@ static void callback(void *args) return; } -static trickle_t trickle; +static trickle_t trickle = { .callback = { .func = &callback, + .args = NULL } }; int main(void) { msg_t msg; unsigned counter = 0; - trickle.callback.func = &callback; - trickle.callback.args = NULL; - trickle_start(sched_active_pid, &trickle, TRICKLE_MSG, TR_IMIN, TR_IDOUBLINGS, TR_REDCONST);