Skip to content

Commit 248a744

Browse files
authored
Merge pull request #185 from signalwire/windowsunittests
Fix build of unit-tests on Windows.
2 parents aa64cd9 + cf6a7f1 commit 248a744

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/testwebsock2.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ static ssize_t append_text_frame(void *bp)
164164
}
165165

166166
memcpy(bp, (void *) &hdr[0], hlen);
167-
memcpy(bp + hlen, data, bytes);
168-
*(uint8_t *)(bp + hlen + bytes) = '\0';
167+
memcpy((unsigned char *)bp + hlen, data, bytes);
168+
*(uint8_t *)((unsigned char *)bp + hlen + bytes) = '\0';
169169

170170
return hlen + bytes;
171171
}
@@ -247,7 +247,6 @@ static void start_tcp_server_and_test_ws(char *ip)
247247
{
248248
ks_thread_t *thread_p = NULL;
249249
ks_pool_t *pool;
250-
ks_sockaddr_t addr;
251250
int family = AF_INET;
252251
ks_socket_t cl_sock = KS_SOCK_INVALID;
253252
char buf[8192] = "";
@@ -302,7 +301,6 @@ static int test_ws(char *url)
302301
ks_pool_t *pool;
303302
kws_opcode_t oc;
304303
uint8_t *rdata;
305-
ks_ssize_t ret;
306304
ks_json_t *req = ks_json_create_object();
307305
ks_json_add_string_to_object(req, "url", url);
308306

0 commit comments

Comments
 (0)