mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-15 09:33:50 +01:00
sys: net: adapt to compile-checked debug messages
This commit is contained in:
parent
c001e14f9d
commit
4dba9ee6ba
@ -59,9 +59,7 @@ static fib_entry_t _fib_entries[GNRC_IPV6_FIB_TABLE_SIZE];
|
||||
fib_table_t gnrc_ipv6_fib_table;
|
||||
#endif
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
static char addr_str[IPV6_ADDR_MAX_STR_LEN];
|
||||
#endif
|
||||
|
||||
kernel_pid_t gnrc_ipv6_pid = KERNEL_PID_UNDEF;
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
#define ENABLE_DEBUG (0)
|
||||
#include "debug.h"
|
||||
|
||||
#if ENABLE_DEBUG && defined(MODULE_IPV6_ADDR)
|
||||
#if defined(MODULE_IPV6_ADDR)
|
||||
static char addr_str[IPV6_ADDR_MAX_STR_LEN];
|
||||
#endif
|
||||
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
ipv6_addr_t gnrc_ipv6_whitelist[GNRC_IPV6_WHITELIST_SIZE];
|
||||
BITFIELD(gnrc_ipv6_whitelist_set, GNRC_IPV6_WHITELIST_SIZE);
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
static char addr_str[IPV6_ADDR_MAX_STR_LEN];
|
||||
#endif
|
||||
|
||||
int gnrc_ipv6_whitelist_add(const ipv6_addr_t *addr)
|
||||
{
|
||||
|
||||
@ -26,9 +26,10 @@
|
||||
#define ENABLE_DEBUG (0)
|
||||
#include "debug.h"
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
/* For PRIu8 etc. */
|
||||
#include <inttypes.h>
|
||||
|
||||
static char addr_str[IPV6_ADDR_MAX_STR_LEN];
|
||||
#endif
|
||||
|
||||
gnrc_pktsnip_t *gnrc_ndp_nbr_sol_build(const ipv6_addr_t *tgt,
|
||||
gnrc_pktsnip_t *options)
|
||||
|
||||
@ -29,9 +29,7 @@ static mutex_t _ctx_mutex = MUTEX_INIT;
|
||||
static uint32_t _current_minute(void);
|
||||
static void _update_lifetime(uint8_t id);
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
static char ipv6str[IPV6_ADDR_MAX_STR_LEN];
|
||||
#endif
|
||||
|
||||
static inline bool _valid(uint8_t id)
|
||||
{
|
||||
|
||||
@ -225,7 +225,7 @@ void gnrc_sixlowpan_frag_send(gnrc_sixlowpan_msg_frag_t *fragment_msg)
|
||||
size_t payload_len = gnrc_pkt_len(fragment_msg->pkt->next);
|
||||
msg_t msg;
|
||||
|
||||
#if defined(DEVELHELP) && defined(ENABLE_DEBUG)
|
||||
#if defined(DEVELHELP) && ENABLE_DEBUG
|
||||
if (iface == NULL) {
|
||||
DEBUG("6lo frag: iface == NULL, expect segmentation fault.\n");
|
||||
/* remove original packet from packet buffer */
|
||||
|
||||
@ -46,9 +46,7 @@ static rbuf_int_t rbuf_int[RBUF_INT_SIZE];
|
||||
|
||||
static rbuf_t rbuf[RBUF_SIZE];
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
static char l2addr_str[3 * RBUF_L2ADDR_MAX_LEN];
|
||||
#endif
|
||||
|
||||
/* ------------------------------------
|
||||
* internal function definitions
|
||||
|
||||
@ -42,9 +42,7 @@
|
||||
#define ENABLE_DEBUG (0)
|
||||
#include "debug.h"
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
static char addr_str[IPV6_ADDR_MAX_STR_LEN];
|
||||
#endif
|
||||
|
||||
#define GNRC_RPL_GROUNDED_SHIFT (7)
|
||||
#define GNRC_RPL_MOP_SHIFT (3)
|
||||
@ -465,8 +463,8 @@ bool _parse_options(int msg_type, gnrc_rpl_instance_t *inst, gnrc_rpl_opt_t *opt
|
||||
first_target = target;
|
||||
}
|
||||
|
||||
DEBUG("RPL: adding FT entry %s/%d 0x%" PRIx32 "\n",
|
||||
ipv6_addr_to_str(addr_str, &(target->target), sizeof(addr_str)),
|
||||
DEBUG("RPL: adding FT entry %s/%d\n",
|
||||
ipv6_addr_to_str(addr_str, &(target->target), (unsigned)sizeof(addr_str)),
|
||||
target->prefix_length);
|
||||
|
||||
gnrc_ipv6_nib_ft_add(&(target->target), target->prefix_length, src,
|
||||
|
||||
@ -32,9 +32,7 @@
|
||||
#define ENABLE_DEBUG (0)
|
||||
#include "debug.h"
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
static char addr_str[IPV6_ADDR_MAX_STR_LEN];
|
||||
#endif
|
||||
|
||||
static gnrc_rpl_parent_t *_gnrc_rpl_find_preferred_parent(gnrc_rpl_dodag_t *dodag);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user