aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/msgpack_rpc
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-10-21 08:53:55 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-10-21 11:05:49 -0300
commit79b7263f793206167260fcbc99bd76f73bfeb2c7 (patch)
treeb13a3d75b080cbb953b5c78c9b7d4777156d937b /src/nvim/msgpack_rpc
parentcf9571b7b144f37b61ceaf3b17e84806913fd969 (diff)
downloadrneovim-79b7263f793206167260fcbc99bd76f73bfeb2c7.tar.gz
rneovim-79b7263f793206167260fcbc99bd76f73bfeb2c7.tar.bz2
rneovim-79b7263f793206167260fcbc99bd76f73bfeb2c7.zip
compilation: Add -Wconversion to more files and validate CONV_SOURCES
All files under the os, api and msgpack_rpc directories have -Wconversion automatically applied. CONV_SOURCES is also checked for missing files(when renaming, for example)
Diffstat (limited to 'src/nvim/msgpack_rpc')
-rw-r--r--src/nvim/msgpack_rpc/channel.c2
-rw-r--r--src/nvim/msgpack_rpc/server.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c
index 6ddda10c5f..a1ab12f7c3 100644
--- a/src/nvim/msgpack_rpc/channel.c
+++ b/src/nvim/msgpack_rpc/channel.c
@@ -331,7 +331,7 @@ static void parse_msgpack(RStream *rstream, void *data, bool eof)
goto end;
}
- uint32_t count = rstream_pending(rstream);
+ size_t count = rstream_pending(rstream);
DLOG("Feeding the msgpack parser with %u bytes of data from RStream(%p)",
count,
rstream);
diff --git a/src/nvim/msgpack_rpc/server.c b/src/nvim/msgpack_rpc/server.c
index 33e01fe562..087ba24111 100644
--- a/src/nvim/msgpack_rpc/server.c
+++ b/src/nvim/msgpack_rpc/server.c
@@ -119,7 +119,8 @@ int server_start(const char *endpoint)
ip_end = strchr(addr, NUL);
}
- uint32_t addr_len = ip_end - addr;
+ // (ip_end - addr) is always > 0, so convert to size_t
+ size_t addr_len = (size_t)(ip_end - addr);
if (addr_len > sizeof(ip) - 1) {
// Maximum length of an IP address buffer is 15(eg: 255.255.255.255)