Skip to content

Commit 592a7e5

Browse files
committed
Compilation fix
1 parent 07499d5 commit 592a7e5

File tree

12 files changed

+52
-46
lines changed

12 files changed

+52
-46
lines changed

examples/arduino/z_get.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void loop() {
120120
z_closure_reply(&callback, reply_handler, reply_dropper, NULL);
121121
z_view_keyexpr_t ke;
122122
z_view_keyexpr_from_string_unchecked(&ke, KEYEXPR);
123-
if (z_get(z_session_loan(&s), z_view_keyexpr_loan(ke), "", z_closure_reply_move(&callback), &opts) < 0) {
123+
if (z_get(z_session_loan(&s), z_view_keyexpr_loan(&ke), "", z_closure_reply_move(&callback), &opts) < 0) {
124124
Serial.println("Unable to send query.");
125125
}
126126
}

examples/arduino/z_pub.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void setup() {
8383
Serial.println("...");
8484
z_view_keyexpr_t ke;
8585
z_view_keyexpr_from_string_unchecked(&ke, KEYEXPR);
86-
if (z_declare_publisher(&pub, z_session_loan(&s), z_view_keyexpr_loan(ke), NULL) < 0) {
86+
if (z_declare_publisher(&pub, z_session_loan(&s), z_view_keyexpr_loan(&ke), NULL) < 0) {
8787
Serial.println("Unable to declare publisher for key expression!");
8888
while (1) {
8989
;

examples/arduino/z_pull.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void setup() {
101101
// @TODO
102102
// z_view_keyexpr_t ke;
103103
// z_view_keyexpr_from_string_unchecked(&ke, KEYEXPR);
104-
// sub = z_declare_pull_subscriber(z_session_loan(&s), z_view_keyexpr_loan(ke), z_closure_sample_move(&callback),
104+
// sub = z_declare_pull_subscriber(z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_sample_move(&callback),
105105
// NULL); if (!z_pull_subscriber_check(&sub)) {
106106
// Serial.println("Unable to declare subscriber.");
107107
// while (1) {

examples/arduino/z_queryable.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void query_handler(const z_loaned_query_t *query, void *arg) {
4747

4848
z_view_keyexpr_t ke;
4949
z_view_keyexpr_from_string_unchecked(&ke, KEYEXPR);
50-
z_query_reply(query, z_view_keyexpr_loan(ke), (const unsigned char *)VALUE, strlen(VALUE), NULL);
50+
z_query_reply(query, z_view_keyexpr_loan(&ke), (const unsigned char *)VALUE, strlen(VALUE), NULL);
5151

5252
z_str_drop(z_str_move(&keystr));
5353
}
@@ -100,7 +100,7 @@ void setup() {
100100
z_owned_queryable_t qable;
101101
z_view_keyexpr_t ke;
102102
z_view_keyexpr_from_string_unchecked(&ke, KEYEXPR);
103-
if (z_declare_queryable(&qable, z_session_loan(&s), z_view_keyexpr_loan(ke), z_closure_query_move(&callback),
103+
if (z_declare_queryable(&qable, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_query_move(&callback),
104104
NULL) < 0) {
105105
Serial.println("Unable to declare queryable.");
106106
while (1) {

examples/arduino/z_sub.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void setup() {
9696
z_owned_subscriber_t sub;
9797
z_view_keyexpr_t ke;
9898
z_view_keyexpr_from_string_unchecked(&ke, KEYEXPR);
99-
if (z_declare_subscriber(&sub, z_session_loan(&s), z_view_keyexpr_loan(ke), z_closure_sample_move(&callback),
99+
if (z_declare_subscriber(&sub, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_sample_move(&callback),
100100
NULL) < 0) {
101101
Serial.println("Unable to declare subscriber.");
102102
while (1) {

examples/espidf/z_scout.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,16 @@ void fprintwhatami(FILE *stream, unsigned int whatami) {
111111

112112
void fprintlocators(FILE *stream, const z_str_array_t *locs) {
113113
fprintf(stream, "[");
114-
for (unsigned int i = 0; i < z_str_array_len(locs); i++) {
115-
fprintf(stream, "\"");
116-
fprintf(stream, "%s", *z_str_array_get(locs, i));
117-
fprintf(stream, "\"");
118-
if (i < z_str_array_len(locs) - 1) {
119-
fprintf(stream, ", ");
120-
}
121-
}
114+
(void)locs;
115+
// TODO(sashacmc): z_str_array missed
116+
// for (unsigned int i = 0; i < z_str_array_len(locs); i++) {
117+
// fprintf(stream, "\"");
118+
// fprintf(stream, "%s", *z_str_array_get(locs, i));
119+
// fprintf(stream, "\"");
120+
// if (i < z_str_array_len(locs) - 1) {
121+
// fprintf(stream, ", ");
122+
// }
123+
//}
122124
fprintf(stream, "]");
123125
}
124126

examples/freertos_plus_tcp/z_scout.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ void fprintwhatami(FILE *stream, unsigned int whatami) {
4545

4646
void fprintlocators(FILE *stream, const z_str_array_t *locs) {
4747
fprintf(stream, "[");
48-
for (unsigned int i = 0; i < z_str_array_len(locs); i++) {
49-
fprintf(stream, "\"");
50-
fprintf(stream, "%s", *z_str_array_get(locs, i));
51-
fprintf(stream, "\"");
52-
if (i < z_str_array_len(locs) - 1) {
53-
fprintf(stream, ", ");
54-
}
55-
}
48+
(void)locs;
49+
// TODO(sashacmc): z_str_array missed
50+
// for (unsigned int i = 0; i < z_str_array_len(locs); i++) {
51+
// fprintf(stream, "\"");
52+
// fprintf(stream, "%s", *z_str_array_get(locs, i));
53+
// fprintf(stream, "\"");
54+
// if (i < z_str_array_len(locs) - 1) {
55+
// fprintf(stream, ", ");
56+
// }
57+
//}
5658
fprintf(stream, "]");
5759
}
5860

examples/unix/c99/z_ping.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ int main(int argc, char** argv) {
8383
z_view_keyexpr_t ping;
8484
z_view_keyexpr_from_string_unchecked(&ping, "test/ping");
8585
z_owned_publisher_t pub;
86-
if (z_declare_publisher(&pub, z_session_loan(&session), z_view_keyexpr_loan(ping), NULL) < 0) {
86+
if (z_declare_publisher(&pub, z_session_loan(&session), z_view_keyexpr_loan(&ping), NULL) < 0) {
8787
printf("Unable to declare publisher for key expression!\n");
8888
return -1;
8989
}
@@ -93,8 +93,8 @@ int main(int argc, char** argv) {
9393
z_owned_closure_sample_t respond;
9494
z_closure_sample(&respond, callback, drop, NULL);
9595
z_owned_subscriber_t sub;
96-
if (z_declare_subscriber(&sub, z_session_loan(&session), z_view_keyexpr_loan(pong), z_closure_sample_move(&respond),
97-
NULL) < 0) {
96+
if (z_declare_subscriber(&sub, z_session_loan(&session), z_view_keyexpr_loan(&pong),
97+
z_closure_sample_move(&respond), NULL) < 0) {
9898
printf("Unable to declare subscriber for key expression.\n");
9999
return -1;
100100
}

examples/unix/c99/z_pong.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ int main(int argc, char** argv) {
5353
z_view_keyexpr_t pong;
5454
z_view_keyexpr_from_string_unchecked(&pong, "test/pong");
5555
z_owned_publisher_t pub;
56-
if (z_declare_publisher(&pub, z_session_loan(&session), z_view_keyexpr_loan(pong), NULL) < 0) {
56+
if (z_declare_publisher(&pub, z_session_loan(&session), z_view_keyexpr_loan(&pong), NULL) < 0) {
5757
printf("Unable to declare publisher for key expression!\n");
5858
return -1;
5959
}
@@ -63,8 +63,8 @@ int main(int argc, char** argv) {
6363
z_owned_closure_sample_t respond;
6464
z_closure_sample(&respond, callback, drop, (void*)z_publisher_move(&pub));
6565
z_owned_subscriber_t sub;
66-
if (z_declare_subscriber(&sub, z_session_loan(&session), z_view_keyexpr_loan(ping), z_closure_sample_move(&respond),
67-
NULL) < 0) {
66+
if (z_declare_subscriber(&sub, z_session_loan(&session), z_view_keyexpr_loan(&ping),
67+
z_closure_sample_move(&respond), NULL) < 0) {
6868
printf("Unable to declare subscriber for key expression.\n");
6969
return -1;
7070
}

examples/windows/z_scout.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,16 @@ void fprintwhatami(FILE *stream, unsigned int whatami) {
4242

4343
void fprintlocators(FILE *stream, const z_str_array_t *locs) {
4444
fprintf(stream, "[");
45-
for (unsigned int i = 0; i < z_str_array_len(locs); i++) {
46-
fprintf(stream, "\"");
47-
fprintf(stream, "%s", *z_str_array_get(locs, i));
48-
fprintf(stream, "\"");
49-
if (i < z_str_array_len(locs) - 1) {
50-
fprintf(stream, ", ");
51-
}
52-
}
45+
(void)locs;
46+
// TODO(sashacmc): z_str_array missed
47+
// for (unsigned int i = 0; i < z_str_array_len(locs); i++) {
48+
// fprintf(stream, "\"");
49+
// fprintf(stream, "%s", *z_str_array_get(locs, i));
50+
// fprintf(stream, "\"");
51+
// if (i < z_str_array_len(locs) - 1) {
52+
// fprintf(stream, ", ");
53+
// }
54+
//}
5355
fprintf(stream, "]");
5456
}
5557

0 commit comments

Comments
 (0)