neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 86807157438240757199f925f538d7ad02322754
parent f140175564001cc1ad84128a0147a5d2f7798a63
Author: Lewis Russell <lewis6991@gmail.com>
Date:   Thu, 23 Feb 2023 15:08:39 +0000

fix: resolve error from -Werror=maybe-uninitialized


Diffstat:
Msrc/nvim/channel.c | 11++---------
1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/nvim/channel.c b/src/nvim/channel.c @@ -372,7 +372,7 @@ Channel *channel_job_start(char **argv, CallbackReader on_stdout, CallbackReader proc->overlapped = overlapped; char *cmd = xstrdup(proc->argv[0]); - bool has_in, has_out, has_err; + bool has_out, has_err; if (proc->type == kProcessTypePty) { has_out = true; has_err = false; @@ -382,14 +382,7 @@ Channel *channel_job_start(char **argv, CallbackReader on_stdout, CallbackReader proc->fwd_err = chan->on_stderr.fwd_err; } - switch (stdin_mode) { - case kChannelStdinPipe: - has_in = true; - break; - case kChannelStdinNull: - has_in = false; - break; - } + bool has_in = stdin_mode == kChannelStdinPipe; int status = process_spawn(proc, has_in, has_out, has_err); if (status) {