From cbc6954b24e927f2a7ba7e013a310eb8239558da Mon Sep 17 00:00:00 2001 From: Denis Biryukov Date: Fri, 20 Sep 2024 09:59:58 +0200 Subject: [PATCH] specify return type for encoding function-constant --- examples/z_bytes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/z_bytes.c b/examples/z_bytes.c index c5ab1bd00..0ab2ced88 100644 --- a/examples/z_bytes.c +++ b/examples/z_bytes.c @@ -51,7 +51,7 @@ int main(void) { assert(input_u32 == output_u32); z_drop(z_move(payload)); // Corresponding encoding to be used in operations options like `z_put()`, `z_get()`, etc. - // encoding = z_encoding_zenoh_uint32(); + // const z_loaned_encoding_t *encoding = z_encoding_zenoh_uint32(); // String, also work with and z_owned_string_t const char *input_str = "test"; @@ -62,7 +62,7 @@ int main(void) { z_drop(z_move(payload)); z_drop(z_move(output_string)); // Corresponding encoding to be used in operations options like `z_put()`, `z_get()`, etc. - // encoding = z_encoding_zenoh_string(); + // const z_loaned_encoding_t *encoding = z_encoding_zenoh_string(); // Bytes, also work with z_owned_slice_t const uint8_t input_bytes[] = {1, 2, 3, 4}; @@ -73,7 +73,7 @@ int main(void) { z_drop(z_move(payload)); z_drop(z_move(output_bytes)); // Corresponding encoding to be used in operations options like `z_put()`, `z_get()`, etc. - // encoding = z_encoding_zenoh_bytes(); // (the default value) + // const z_loaned_encoding_t *encoding = z_encoding_zenoh_bytes(); // (the default value) // Writer reader uint8_t input_writer[] = {0, 1, 2, 3, 4};