1
0
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:
Joakim Nohlgård 2018-06-15 00:44:02 +02:00 committed by Martine S. Lenders
parent 22d44d0763
commit ce5141ace6
No known key found for this signature in database
GPG Key ID: CCD317364F63286F
4 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

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

View File

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