aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGeorge Zhao <zhaozg@gmail.com>2018-01-17 19:40:31 +0800
committerGeorge Zhao <zhaozg@gmail.com>2018-01-18 21:30:04 +0800
commit12acf0f7a76160e33bb84876121d3a63dde3c252 (patch)
tree17534b03eddec52f6117dd0d707495c78566c2ad /test
parentbac86a194117008656d02951de6d303ab8687eec (diff)
downloadrneovim-12acf0f7a76160e33bb84876121d3a63dde3c252.tar.gz
rneovim-12acf0f7a76160e33bb84876121d3a63dde3c252.tar.bz2
rneovim-12acf0f7a76160e33bb84876121d3a63dde3c252.zip
Fix warning when assing size_t type value to uv_buf_t.len, convert type to ULONG on Windows.
Diffstat (limited to 'test')
-rw-r--r--test/functional/fixtures/tty-test.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/functional/fixtures/tty-test.c b/test/functional/fixtures/tty-test.c
index edcbe23f86..9c42ca28d0 100644
--- a/test/functional/fixtures/tty-test.c
+++ b/test/functional/fixtures/tty-test.c
@@ -94,7 +94,14 @@ static void read_cb(uv_stream_t *stream, ssize_t cnt, const uv_buf_t *buf)
uv_tty_init(&write_loop, &out, fileno(stdout), 0);
uv_write_t req;
- uv_buf_t b = {.base = buf->base, .len = (size_t)cnt};
+ uv_buf_t b = {
+ .base = buf->base,
+#ifdef WIN32
+ .len = (ULONG)cnt
+#else
+ .len = (size_t)cnt
+#endif
+ };
uv_write(&req, STRUCT_CAST(uv_stream_t, &out), &b, 1, NULL);
uv_run(&write_loop, UV_RUN_DEFAULT);