1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

make: enable Wall and Wextra by default, and optionally Wpedantic

This commit is contained in:
smlng 2017-10-31 11:51:37 +01:00
parent b283b7784c
commit 57c5c9b6a6
3 changed files with 9 additions and 9 deletions

View File

@ -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))

View File

@ -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;
}

View File

@ -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);