patch 9.0.0376: clang warns for dead assignments
Problem: Clang warns for dead assignments.
Solution: Adjust the code. (Yegappan Lakshmanan, closes #11048)
diff --git a/src/os_unix.c b/src/os_unix.c
index 4dadac3..1ac6e19 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -4522,7 +4522,7 @@
// 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 @@
{
// finished all the lines, close pipe
close(toshell_fd);
- toshell_fd = -1;
break;
}
lp = ml_get(lnum);
@@ -5399,7 +5398,7 @@
* 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 @@
#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