diff options
author | John Szakmeister <john@szakmeister.net> | 2015-03-20 09:54:06 -0400 |
---|---|---|
committer | John Szakmeister <john@szakmeister.net> | 2015-03-20 09:54:06 -0400 |
commit | 90bce5ad38190374ecd4bcc4315e1524a940a296 (patch) | |
tree | 0031b5fff304e36114191f0348cdfa259cd323e1 | |
parent | 657d274520e422f8b590ee8e5b8ae3d8bf96b02b (diff) | |
parent | 24f2504036289d7def265507524ab4a4dc58ddcc (diff) | |
download | rneovim-90bce5ad38190374ecd4bcc4315e1524a940a296.tar.gz rneovim-90bce5ad38190374ecd4bcc4315e1524a940a296.tar.bz2 rneovim-90bce5ad38190374ecd4bcc4315e1524a940a296.zip |
Merge pull request #2144 from jszakmeister/fix-warning-in-release
Fix a couple warnings in the release build.
-rw-r--r-- | src/nvim/msgpack_rpc/channel.c | 4 | ||||
-rw-r--r-- | src/nvim/os/wstream.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c index 00b8cd072f..25d41e7328 100644 --- a/src/nvim/msgpack_rpc/channel.c +++ b/src/nvim/msgpack_rpc/channel.c @@ -338,12 +338,12 @@ static void job_err(RStream *rstream, void *data, bool eof) { size_t count; char buf[256]; - Channel *channel = job_data(data); while ((count = rstream_pending(rstream))) { size_t read = rstream_read(rstream, buf, sizeof(buf) - 1); buf[read] = NUL; - ELOG("Channel %" PRIu64 " stderr: %s", channel->id, buf); + ELOG("Channel %" PRIu64 " stderr: %s", + ((Channel *)job_data(data))->id, buf); } } diff --git a/src/nvim/os/wstream.c b/src/nvim/os/wstream.c index 6a650ce775..90d4ebeec8 100644 --- a/src/nvim/os/wstream.c +++ b/src/nvim/os/wstream.c @@ -116,9 +116,8 @@ void wstream_set_stream(WStream *wstream, uv_stream_t *stream) /// @param file The file descriptor void wstream_set_file(WStream *wstream, uv_file file) { - uv_handle_type type = uv_guess_handle(file); - - assert(type == UV_NAMED_PIPE || type == UV_TTY); + assert(uv_guess_handle(file) == UV_NAMED_PIPE || + uv_guess_handle(file) == UV_TTY); wstream->stream = xmalloc(sizeof(uv_pipe_t)); uv_pipe_init(uv_default_loop(), (uv_pipe_t *)wstream->stream, 0); uv_pipe_open((uv_pipe_t *)wstream->stream, file); |