mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-01 07:25:47 +03:00
test_pdu.c: fix type warnings
Commit e4e067e5f has introduced a new type for PDU request and status
codes, coap_pdu_code_t. This change now uses proper enums values to
fix compiler warnings (-Wenum-conversion).
This commit is contained in:
1 parent
04c641f7f0
commit
acb4f91633
2 files changed
+4
-4
No files matched your search
+3
-3
@@ -334,7 +334,7 @@ t_encode_pdu1(void) {
|
||||
|
||||
coap_pdu_clear(pdu, pdu->max_size);
|
||||
pdu->type = COAP_MESSAGE_CON;
|
||||
pdu->code = COAP_REQUEST_GET;
|
||||
pdu->code = COAP_REQUEST_CODE_GET;
|
||||
pdu->mid = 0x1234;
|
||||
|
||||
result = coap_add_token(pdu, 5, (const uint8_t *)"token");
|
||||
@@ -354,7 +354,7 @@ t_encode_pdu2(void) {
|
||||
coap_pdu_clear(pdu, 3); /* set very small PDU size */
|
||||
|
||||
pdu->type = COAP_MESSAGE_CON;
|
||||
pdu->code = COAP_REQUEST_GET;
|
||||
pdu->code = COAP_REQUEST_CODE_GET;
|
||||
pdu->mid = 0x1234;
|
||||
|
||||
result = coap_add_token(pdu, 5, (const uint8_t *)"token");
|
||||
@@ -477,7 +477,7 @@ t_encode_pdu6(void) {
|
||||
coap_pdu_clear(pdu, pdu->max_size); /* clear PDU */
|
||||
|
||||
pdu->type = COAP_MESSAGE_NON;
|
||||
pdu->code = COAP_REQUEST_POST;
|
||||
pdu->code = COAP_REQUEST_CODE_POST;
|
||||
pdu->mid = 0x1234;
|
||||
|
||||
CU_ASSERT(pdu->used_size == 0);
|
||||
|
||||
@@ -223,7 +223,7 @@ t_wellknown6(void) {
|
||||
coap_pdu_clear(pdu, pdu->max_size); /* clear PDU */
|
||||
|
||||
pdu->type = COAP_MESSAGE_NON;
|
||||
pdu->code = COAP_REQUEST_GET;
|
||||
pdu->code = COAP_REQUEST_CODE_GET;
|
||||
pdu->mid = 0x1234;
|
||||
|
||||
CU_ASSERT_PTR_NOT_NULL(pdu);
|
||||
|
||||
Reference in new issue
Block a user