Skip to content

Commit 9002655

Browse files
authored
Fix Wconversion errors on querier example (#883)
* fix: null malloc allocation * fix: wconversion errors
1 parent 8eafbca commit 9002655

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/unix/c11/z_querier.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ int main(int argc, char **argv) {
108108
size_t ke_len = strlen(ke);
109109
const char *params = strchr(selector, '?');
110110
if (params != NULL) {
111-
ke_len = params - ke;
111+
ke_len = (size_t)(params - ke);
112112
params += 1;
113113
}
114114

@@ -123,7 +123,7 @@ int main(int argc, char **argv) {
123123

124124
z_querier_options_t opts;
125125
z_querier_options_default(&opts);
126-
opts.timeout_ms = timeout_ms;
126+
opts.timeout_ms = (uint64_t)timeout_ms;
127127

128128
if (z_declare_querier(z_loan(s), &querier, z_loan(keyexpr), &opts) < 0) {
129129
printf("Unable to declare Querier for key expression!\n");

0 commit comments

Comments
 (0)