From 564448ae96ff8c3b69b4317a1c3d33a1aa41a722 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 15 May 2017 16:36:44 +0200 Subject: [PATCH 1/2] dist: tools: coccinelle: add enable_debug_false.cocci --- dist/tools/coccinelle/warn/enable_debug_false.cocci | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 dist/tools/coccinelle/warn/enable_debug_false.cocci diff --git a/dist/tools/coccinelle/warn/enable_debug_false.cocci b/dist/tools/coccinelle/warn/enable_debug_false.cocci new file mode 100644 index 000000000..9742f5bf3 --- /dev/null +++ b/dist/tools/coccinelle/warn/enable_debug_false.cocci @@ -0,0 +1,5 @@ +@@ +@@ + +- #define ENABLE_DEBUG (1) ++ #define ENABLE_DEBUG (0) From 8501a03cbc2be764b69ef350eabb1ae187b1d4f2 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 15 May 2017 16:37:55 +0200 Subject: [PATCH 2/2] cleanup: apply enable_debug_false.cocci to codebase (coccinelle) Skipped sys/cbor/cbor.c, examples/microcoap_server/microcoap_sock.c, as they use different semantics. --- cpu/sam0_common/periph/adc.c | 2 +- cpu/samd21/periph/pm.c | 2 +- cpu/stm32_common/periph/pm.c | 2 +- drivers/lsm6dsl/lsm6dsl.c | 2 +- examples/dtls-echo/dtls-client.c | 2 +- examples/dtls-echo/dtls-server.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpu/sam0_common/periph/adc.c b/cpu/sam0_common/periph/adc.c index e1f7bdc54..3975e77f3 100644 --- a/cpu/sam0_common/periph/adc.c +++ b/cpu/sam0_common/periph/adc.c @@ -15,7 +15,7 @@ #include "periph_conf.h" #include "mutex.h" -#define ENABLE_DEBUG (1) +#define ENABLE_DEBUG (0) #include "debug.h" /* Only if we actually have any ADCs */ diff --git a/cpu/samd21/periph/pm.c b/cpu/samd21/periph/pm.c index 3ab020f3c..a9c9839c1 100644 --- a/cpu/samd21/periph/pm.c +++ b/cpu/samd21/periph/pm.c @@ -24,7 +24,7 @@ #include "periph/pm.h" -#define ENABLE_DEBUG (1) +#define ENABLE_DEBUG (0) #include "debug.h" enum system_sleepmode { diff --git a/cpu/stm32_common/periph/pm.c b/cpu/stm32_common/periph/pm.c index 1c72bbfc0..57497af46 100644 --- a/cpu/stm32_common/periph/pm.c +++ b/cpu/stm32_common/periph/pm.c @@ -25,7 +25,7 @@ #include "irq.h" #include "periph/pm.h" -#define ENABLE_DEBUG (1) +#define ENABLE_DEBUG (0) #include "debug.h" void pm_set(unsigned mode) diff --git a/drivers/lsm6dsl/lsm6dsl.c b/drivers/lsm6dsl/lsm6dsl.c index 3b1b911c3..ce418eb6b 100644 --- a/drivers/lsm6dsl/lsm6dsl.c +++ b/drivers/lsm6dsl/lsm6dsl.c @@ -19,7 +19,7 @@ #include "lsm6dsl.h" #include "lsm6dsl_internal.h" -#define ENABLE_DEBUG (1) +#define ENABLE_DEBUG (0) #include "debug.h" #define MAX(a, b) ((a) > (b) ? (a) : (b)) diff --git a/examples/dtls-echo/dtls-client.c b/examples/dtls-echo/dtls-client.c index b5dcbce24..63a8d76cc 100644 --- a/examples/dtls-echo/dtls-client.c +++ b/examples/dtls-echo/dtls-client.c @@ -30,7 +30,7 @@ #include "timex.h" #include "xtimer.h" -#define ENABLE_DEBUG (1) +#define ENABLE_DEBUG (0) #include "debug.h" /* TinyDTLS */ diff --git a/examples/dtls-echo/dtls-server.c b/examples/dtls-echo/dtls-server.c index bbec858e1..0bbd58d8a 100644 --- a/examples/dtls-echo/dtls-server.c +++ b/examples/dtls-echo/dtls-server.c @@ -37,7 +37,7 @@ #include "dtls_debug.h" #include "tinydtls.h" -#define ENABLE_DEBUG (1) +#define ENABLE_DEBUG (0) #include "debug.h" //#define DEFAULT_PORT 20220 /* DTLS default port */