mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
make: enable Wall and Wextra by default, and optionally Wpedantic
This commit is contained in:
parent
b283b7784c
commit
57c5c9b6a6
@ -123,7 +123,13 @@ endif
|
|||||||
WERROR ?= 1
|
WERROR ?= 1
|
||||||
export WERROR
|
export WERROR
|
||||||
ifeq ($(WERROR),1)
|
ifeq ($(WERROR),1)
|
||||||
CFLAGS += -Werror
|
CFLAGS += -Wall -Werror -Wextra
|
||||||
|
endif
|
||||||
|
|
||||||
|
WPEDANTIC ?= 0
|
||||||
|
export WPEDANTIC
|
||||||
|
ifeq ($(WPEDANTIC),1)
|
||||||
|
CFLAGS += -Wpedantic -pedantic-errors
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (10,$(if ${RIOT_VERSION},1,0)$(if ${__RIOTBUILD_FLAG},1,0))
|
ifneq (10,$(if ${RIOT_VERSION},1,0)$(if ${__RIOTBUILD_FLAG},1,0))
|
||||||
|
@ -354,10 +354,6 @@ int nrf24l01p_set_payload_width(const nrf24l01p_t *dev,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (width == 0) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (width > 32) {
|
if (width > 32) {
|
||||||
width = 32;
|
width = 32;
|
||||||
}
|
}
|
||||||
|
@ -53,16 +53,14 @@ static void callback(void *args)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static trickle_t trickle;
|
static trickle_t trickle = { .callback = { .func = &callback,
|
||||||
|
.args = NULL } };
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
msg_t msg;
|
msg_t msg;
|
||||||
unsigned counter = 0;
|
unsigned counter = 0;
|
||||||
|
|
||||||
trickle.callback.func = &callback;
|
|
||||||
trickle.callback.args = NULL;
|
|
||||||
|
|
||||||
trickle_start(sched_active_pid, &trickle, TRICKLE_MSG, TR_IMIN,
|
trickle_start(sched_active_pid, &trickle, TRICKLE_MSG, TR_IMIN,
|
||||||
TR_IDOUBLINGS, TR_REDCONST);
|
TR_IDOUBLINGS, TR_REDCONST);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user