fix(coverity): CID 509571 Uninitialized variables #30395

/src/nvim/os/pty_proc_unix.c: 416 in pty_proc_init()
    410     {
    411       PtyProc rv;
    412       rv.proc = proc_init(loop, kProcTypePty, data);
    413       rv.width = 80;
    414       rv.height = 24;
    415       rv.tty_fd = -1;
    >>>     CID 509571:  Uninitialized variables  (UNINIT)
    >>>     Using uninitialized value "rv". Field "rv.winsize" is uninitialized.
    416       return rv;
This commit is contained in:
Justin M. Keyes 2024-09-18 01:26:04 -07:00 committed by GitHub
parent 44afd07443
commit 83a7d97d64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -408,7 +408,7 @@ static void chld_handler(uv_signal_t *handle, int signum)
PtyProc pty_proc_init(Loop *loop, void *data) PtyProc pty_proc_init(Loop *loop, void *data)
{ {
PtyProc rv; PtyProc rv = { 0 };
rv.proc = proc_init(loop, kProcTypePty, data); rv.proc = proc_init(loop, kProcTypePty, data);
rv.width = 80; rv.width = 80;
rv.height = 24; rv.height = 24;