diff src/os_unix.c @ 30077:d45ee1f829ba v9.0.0376

patch 9.0.0376: clang warns for dead assignments Commit: https://github.com/vim/vim/commit/6b085b9d7367e077ca69f4f82ba0f92cc6b6e443 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sun Sep 4 12:47:21 2022 +0100 patch 9.0.0376: clang warns for dead assignments Problem: Clang warns for dead assignments. Solution: Adjust the code. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/11048)
author Bram Moolenaar <Bram@vim.org>
date Sun, 04 Sep 2022 14:00:03 +0200
parents 3276298c67c5
children fdf704505754
line wrap: on
line diff
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -4522,7 +4522,7 @@ mch_call_shell_terminal(
     // restore curwin/curbuf and a few other things
     aucmd_restbuf(&aco);
 
-    // only require pressing Enter when redrawing, to avoid that system() gets
+    // Only require pressing Enter when redrawing, to avoid that system() gets
     // the hit-enter prompt even though it didn't output anything.
     if (!RedrawingDisabled)
 	wait_return(TRUE);
@@ -5021,7 +5021,6 @@ mch_call_shell_fork(
 				{
 				    // finished all the lines, close pipe
 				    close(toshell_fd);
-				    toshell_fd = -1;
 				    break;
 				}
 				lp = ml_get(lnum);
@@ -5399,7 +5398,7 @@ finished:
 	     * child already exited.
 	     */
 	    if (wait_pid != pid)
-		wait_pid = wait4pid(pid, &status);
+		(void)wait4pid(pid, &status);
 
 # ifdef FEAT_GUI
 	    // Close slave side of pty.  Only do this after the child has
@@ -6495,7 +6494,7 @@ select_eintr:
 #ifdef FEAT_JOB_CHANNEL
 	// also call when ret == 0, we may be polling a keep-open channel
 	if (ret >= 0)
-	    ret = channel_select_check(ret, &rfds, &wfds);
+	    (void)channel_select_check(ret, &rfds, &wfds);
 #endif
 
 #endif // HAVE_SELECT