Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
p-avital committed Jul 12, 2023
1 parent 6cc8f78 commit 3f20241
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tests/z_msgcodec_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1619,11 +1619,11 @@ _z_network_message_t gen_net_msg(void) {
case 3: {
return (_z_network_message_t){._tag = _Z_N_RESPONSE, ._body._response = gen_response()};
} break;
case 4: {
case 4:
default: {
return (_z_network_message_t){._tag = _Z_N_RESPONSE_FINAL, ._body._response_final = gen_response_final()};
} break;
}
assert(false);
}
void assert_eq_net_msg(const _z_network_message_t *left, const _z_network_message_t *right) {
assert(left->_tag == right->_tag);
Expand Down Expand Up @@ -1726,11 +1726,11 @@ _z_transport_message_t gen_transport(void) {
case 5: {
return gen_frame();
};
case 6: {
case 6:
default: {
return gen_fragment();
};
}
assert(false);
}
void assert_eq_transport(const _z_transport_message_t *left, const _z_transport_message_t *right) {
assert(left->_header == right->_header);
Expand Down
8 changes: 6 additions & 2 deletions tests/z_peer_multicast_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <stdlib.h>

#include "zenoh-pico.h"
#include "zenoh-pico/collections/bytes.h"
#include "zenoh-pico/protocol/core.h"

#define MSG 10
#define MSG_LEN 1024
Expand Down Expand Up @@ -68,7 +70,8 @@ int main(int argc, char **argv) {

z_owned_session_t s1 = z_open(z_move(config));
assert(z_check(s1));
z_string_t zid1 = _z_string_from_bytes(&z_loan(s1)._val->_local_zid);
_z_bytes_t id_as_bytes = _z_bytes_wrap(z_loan(s1)._val->_local_zid.id, _z_id_len(z_loan(s1)._val->_local_zid));
z_string_t zid1 = _z_string_from_bytes(&id_as_bytes);
printf("Session 1 with PID: %s\n", zid1.val);
_z_string_clear(&zid1);

Expand All @@ -84,7 +87,8 @@ int main(int argc, char **argv) {

z_owned_session_t s2 = z_open(z_move(config));
assert(z_check(s2));
z_string_t zid2 = _z_string_from_bytes(&z_loan(s2)._val->_local_zid);
id_as_bytes = _z_bytes_wrap(z_loan(s2)._val->_local_zid.id, _z_id_len(z_loan(s2)._val->_local_zid));
z_string_t zid2 = _z_string_from_bytes(&id_as_bytes);
printf("Session 2 with PID: %s\n", zid2.val);
_z_string_clear(&zid2);

Expand Down

0 comments on commit 3f20241

Please sign in to comment.