mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	build: fix some warnings
../src/nvim/event/rstream.c:119:44: warning: format specifies type 'void *' but the argument has type 'Stream *' (aka 'struct stream *') [-Wformat-pedantic]
          DLOG("Closing Stream (%p): %s (%s)", stream,
                                ~~             ^~~~~~
    ../src/nvim/event/stream.c:95:30: warning: format specifies type 'void *' but the argument has type 'Stream *' (aka 'struct stream *') [-Wformat-pedantic]
      DLOG("closing Stream: %p", stream);
                            ~~   ^~~~~~
    ../src/nvim/msgpack_rpc/channel.c:71:72: warning: format specifies type 'void *' but the argument has type 'Stream *' (aka 'struct stream *') [-Wformat-pedantic]
        DLOG("rpc ch %" PRIu64 " in-stream=%p out-stream=%p", channel->id, in, out);
                                           ~~                              ^~
    ../src/nvim/msgpack_rpc/channel.c:71:76: warning: format specifies type 'void *' but the argument has type 'Stream *' (aka 'struct stream *') [-Wformat-pedantic]
        DLOG("rpc ch %" PRIu64 " in-stream=%p out-stream=%p", channel->id, in, out);
                                                         ~~                    ^~~
    ../src/nvim/msgpack_rpc/channel.c:226:28: warning: format specifies type 'void *' but the argument has type 'Stream *' (aka 'struct stream *') [-Wformat-pedantic]
           channel->id, count, stream);
                               ^~~~~~
			
			
This commit is contained in:
		@@ -116,7 +116,7 @@ static void read_cb(uv_stream_t *uvstream, ssize_t cnt, const uv_buf_t *buf)
 | 
				
			|||||||
      // The TTY driver might signal EOF without closing the stream
 | 
					      // The TTY driver might signal EOF without closing the stream
 | 
				
			||||||
      invoke_read_cb(stream, 0, true);
 | 
					      invoke_read_cb(stream, 0, true);
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      DLOG("Closing Stream (%p): %s (%s)", stream,
 | 
					      DLOG("closing Stream (%p): %s (%s)", (void *)stream,
 | 
				
			||||||
           uv_err_name((int)cnt), os_strerror((int)cnt));
 | 
					           uv_err_name((int)cnt), os_strerror((int)cnt));
 | 
				
			||||||
      // Read error or EOF, either way stop the stream and invoke the callback
 | 
					      // Read error or EOF, either way stop the stream and invoke the callback
 | 
				
			||||||
      // with eof == true
 | 
					      // with eof == true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -92,7 +92,7 @@ void stream_close(Stream *stream, stream_close_cb on_stream_close, void *data)
 | 
				
			|||||||
  FUNC_ATTR_NONNULL_ARG(1)
 | 
					  FUNC_ATTR_NONNULL_ARG(1)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  assert(!stream->closed);
 | 
					  assert(!stream->closed);
 | 
				
			||||||
  DLOG("closing Stream: %p", stream);
 | 
					  DLOG("closing Stream: %p", (void *)stream);
 | 
				
			||||||
  stream->closed = true;
 | 
					  stream->closed = true;
 | 
				
			||||||
  stream->close_cb = on_stream_close;
 | 
					  stream->close_cb = on_stream_close;
 | 
				
			||||||
  stream->close_cb_data = data;
 | 
					  stream->close_cb_data = data;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -68,7 +68,8 @@ void rpc_start(Channel *channel)
 | 
				
			|||||||
    Stream *out = channel_outstream(channel);
 | 
					    Stream *out = channel_outstream(channel);
 | 
				
			||||||
#if MIN_LOG_LEVEL <= DEBUG_LOG_LEVEL
 | 
					#if MIN_LOG_LEVEL <= DEBUG_LOG_LEVEL
 | 
				
			||||||
    Stream *in = channel_instream(channel);
 | 
					    Stream *in = channel_instream(channel);
 | 
				
			||||||
    DLOG("rpc ch %" PRIu64 " in-stream=%p out-stream=%p", channel->id, in, out);
 | 
					    DLOG("rpc ch %" PRIu64 " in-stream=%p out-stream=%p", channel->id,
 | 
				
			||||||
 | 
					         (void *)in, (void *)out);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    rstream_start(out, receive_msgpack, channel);
 | 
					    rstream_start(out, receive_msgpack, channel);
 | 
				
			||||||
@@ -223,7 +224,7 @@ static void receive_msgpack(Stream *stream, RBuffer *rbuf, size_t c,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  size_t count = rbuffer_size(rbuf);
 | 
					  size_t count = rbuffer_size(rbuf);
 | 
				
			||||||
  DLOG("ch %" PRIu64 ": parsing %zu bytes from msgpack Stream: %p",
 | 
					  DLOG("ch %" PRIu64 ": parsing %zu bytes from msgpack Stream: %p",
 | 
				
			||||||
       channel->id, count, stream);
 | 
					       channel->id, count, (void *)stream);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Feed the unpacker with data
 | 
					  // Feed the unpacker with data
 | 
				
			||||||
  msgpack_unpacker_reserve_buffer(channel->rpc.unpacker, count);
 | 
					  msgpack_unpacker_reserve_buffer(channel->rpc.unpacker, count);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user