Skip to content

Commit

Permalink
Merge pull request #251 from eclipse-zenoh/fix_warnings
Browse files Browse the repository at this point in the history
fix warnings when zenoh-pico included into C++ project
  • Loading branch information
milyin authored Sep 18, 2023
2 parents 8abd39b + e76e367 commit ab578c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/zenoh-pico/protocol/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ static inline _Bool _z_keyexpr_is_local(const _z_keyexpr_t *key) {
}
static inline _z_mapping_t _z_keyexpr_mapping(uint16_t id, _Bool owns_suffix) {
assert(id <= _Z_KEYEXPR_MAPPING_UNKNOWN_REMOTE);
return (_z_mapping_t){._val = (uint16_t)((owns_suffix ? 0x8000 : 0) | id)};
_z_mapping_t mapping = {(uint16_t)((owns_suffix ? 0x8000 : 0) | id)};
return mapping;
}
static inline void _z_keyexpr_set_mapping(_z_keyexpr_t *ke, uint16_t id) {
assert(id <= _Z_KEYEXPR_MAPPING_UNKNOWN_REMOTE);
Expand Down
5 changes: 4 additions & 1 deletion include/zenoh-pico/protocol/keyexpr.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ _z_keyexpr_t _z_keyexpr_duplicate(_z_keyexpr_t src);
_z_keyexpr_t _z_keyexpr_to_owned(_z_keyexpr_t src);
_z_keyexpr_t _z_keyexpr_alias(_z_keyexpr_t src);
_z_keyexpr_t _z_keyexpr_steal(_Z_MOVE(_z_keyexpr_t) src);
static inline _z_keyexpr_t _z_keyexpr_null(void) { return (_z_keyexpr_t){._id = 0, ._mapping = {0}, ._suffix = NULL}; }
static inline _z_keyexpr_t _z_keyexpr_null(void) {
_z_keyexpr_t keyexpr = {0, {0}, NULL};
return keyexpr;
}
_z_timestamp_t _z_timestamp_duplicate(const _z_timestamp_t *tstamp);
void _z_timestamp_clear(_z_timestamp_t *tstamp);
void _z_keyexpr_clear(_z_keyexpr_t *rk);
Expand Down

0 comments on commit ab578c2

Please sign in to comment.