mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
unittests: Qualifier cast for pktsnip test initializers
This commit is contained in:
parent
22d44d0763
commit
ce5141ace6
@ -27,10 +27,10 @@
|
||||
#include "tests-pkt.h"
|
||||
|
||||
#define _INIT_ELEM(len, _data, _next) \
|
||||
{ .users = 1, .next = (_next), .data = (_data), \
|
||||
{ .users = 1, .next = (_next), .data = (void *)(_data), \
|
||||
.size = (len), .type = GNRC_NETTYPE_UNDEF \
|
||||
}
|
||||
#define _INIT_ELEM_STATIC_DATA(data, next) _INIT_ELEM(sizeof(data), data, next)
|
||||
#define _INIT_ELEM_STATIC_DATA(data, next) _INIT_ELEM(sizeof(data), (void *)(data), (next))
|
||||
|
||||
#define _INIT_ELEM_STATIC_TYPE(_type, _next) \
|
||||
{ .users = 1, .next = (_next), .data = NULL, .size = 0, .type = (_type) }
|
||||
|
@ -709,7 +709,7 @@ static void test_pktbuf_hold__pkt_null(void)
|
||||
|
||||
static void test_pktbuf_hold__pkt_external(void)
|
||||
{
|
||||
gnrc_pktsnip_t pkt = { NULL, TEST_STRING8, sizeof(TEST_STRING8), 1, GNRC_NETTYPE_TEST };
|
||||
gnrc_pktsnip_t pkt = { NULL, (void *)TEST_STRING8, sizeof(TEST_STRING8), 1, GNRC_NETTYPE_TEST };
|
||||
|
||||
gnrc_pktbuf_hold(&pkt, 1);
|
||||
TEST_ASSERT(gnrc_pktbuf_is_empty());
|
||||
|
@ -22,8 +22,8 @@
|
||||
#include "tests-pktqueue.h"
|
||||
|
||||
#define PKT_INIT_ELEM(len, data, next) \
|
||||
{ (next), (data), (len), 1, GNRC_NETTYPE_UNDEF }
|
||||
#define PKT_INIT_ELEM_STATIC_DATA(data, next) PKT_INIT_ELEM(sizeof(data), data, next)
|
||||
{ (next), (void *)(data), (len), 1, GNRC_NETTYPE_UNDEF }
|
||||
#define PKT_INIT_ELEM_STATIC_DATA(data, next) PKT_INIT_ELEM(sizeof(data), (void *)(data), (next))
|
||||
#define PKTQUEUE_INIT_ELEM(pkt) { NULL, pkt }
|
||||
|
||||
static gnrc_pktqueue_t *root;
|
||||
|
@ -23,8 +23,8 @@
|
||||
#include "tests-priority_pktqueue.h"
|
||||
|
||||
#define PKT_INIT_ELEM(len, data, next) \
|
||||
{ (next), (data), (len), 1, GNRC_NETTYPE_UNDEF }
|
||||
#define PKT_INIT_ELEM_STATIC_DATA(data, next) PKT_INIT_ELEM(sizeof(data), data, next)
|
||||
{ (next), (void *)(data), (len), 1, GNRC_NETTYPE_UNDEF }
|
||||
#define PKT_INIT_ELEM_STATIC_DATA(data, next) PKT_INIT_ELEM(sizeof(data), (void *)(data), (next))
|
||||
#define PKTQUEUE_INIT_ELEM(pkt) { NULL, pkt }
|
||||
|
||||
static gnrc_priority_pktqueue_t pkt_queue;
|
||||
|
Loading…
Reference in New Issue
Block a user