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/insexpand.c b/src/insexpand.c
index b91c230..f9ee4e6 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -3121,8 +3121,10 @@
 				      ? compl_curr_match->cp_number - 1 : -1);
     }
 
-    // TODO
-    // if (ret == OK && (what_flag & CI_WHAT_INSERTED))
+    if (ret == OK && (what_flag & CI_WHAT_INSERTED))
+    {
+	// TODO
+    }
 }
 
 /*
diff --git a/src/ops.c b/src/ops.c
index 5629a1a..88d85f8 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -1344,7 +1344,6 @@
 		    pos.col = 0;
 		    pos.lnum++;
 		}
-		ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
 		count = oap->end.col - pos.col + 1;
 		netbeans_removed(curbuf, pos.lnum, pos.col, (long)count);
 		// get the line again, it may have been flushed
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
diff --git a/src/userfunc.c b/src/userfunc.c
index c33ec63..0c6f993 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -312,8 +312,6 @@
 		// find the end of the expression (doesn't evaluate it)
 		any_default = TRUE;
 		p = skipwhite(p) + 1;
-		whitep = p;
-		p = skipwhite(p);
 		expr = p;
 		if (eval1(&p, &rettv, NULL) != FAIL)
 		{
diff --git a/src/version.c b/src/version.c
index 1ceb171..1e3f9a3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    376,
+/**/
     375,
 /**/
     374,
diff --git a/src/vim9instr.c b/src/vim9instr.c
index ae4de33..34d4ae3 100644
--- a/src/vim9instr.c
+++ b/src/vim9instr.c
@@ -514,10 +514,8 @@
     int
 generate_COND2BOOL(cctx_T *cctx)
 {
-    isn_T	*isn;
-
     RETURN_OK_IF_SKIP(cctx);
-    if ((isn = generate_instr(cctx, ISN_COND2BOOL)) == NULL)
+    if (generate_instr(cctx, ISN_COND2BOOL) == NULL)
 	return FAIL;
 
     // type becomes bool
@@ -741,13 +739,9 @@
     int
 generate_PUSHCHANNEL(cctx_T *cctx)
 {
-#ifdef FEAT_JOB_CHANNEL
-    isn_T	*isn;
-#endif
-
     RETURN_OK_IF_SKIP(cctx);
 #ifdef FEAT_JOB_CHANNEL
-    if ((isn = generate_instr_type(cctx, ISN_PUSHCHANNEL, &t_channel)) == NULL)
+    if (generate_instr_type(cctx, ISN_PUSHCHANNEL, &t_channel) == NULL)
 	return FAIL;
     return OK;
 #else
@@ -762,13 +756,9 @@
     int
 generate_PUSHJOB(cctx_T *cctx)
 {
-#ifdef FEAT_JOB_CHANNEL
-    isn_T	*isn;
-#endif
-
     RETURN_OK_IF_SKIP(cctx);
 #ifdef FEAT_JOB_CHANNEL
-    if ((isn = generate_instr_type(cctx, ISN_PUSHJOB, &t_job)) == NULL)
+    if (generate_instr_type(cctx, ISN_PUSHJOB, &t_job) == NULL)
 	return FAIL;
     return OK;
 #else
@@ -1067,10 +1057,8 @@
     int
 generate_LOCKCONST(cctx_T *cctx)
 {
-    isn_T	*isn;
-
     RETURN_OK_IF_SKIP(cctx);
-    if ((isn = generate_instr(cctx, ISN_LOCKCONST)) == NULL)
+    if (generate_instr(cctx, ISN_LOCKCONST) == NULL)
 	return FAIL;
     return OK;
 }
diff --git a/src/viminfo.c b/src/viminfo.c
index acdf618..546103e 100644
--- a/src/viminfo.c
+++ b/src/viminfo.c
@@ -2324,7 +2324,7 @@
 		    // Read the next line.  If it has the "*" mark compare the
 		    // time stamps.  Write entries from "buflist" that are
 		    // newer.
-		    if (!(eof = viminfo_readline(virp)) && line[0] == TAB)
+		    if (!viminfo_readline(virp) && line[0] == TAB)
 		    {
 			did_read_line = TRUE;
 			if (line[1] == '*')
diff --git a/src/xxd/xxd.c b/src/xxd/xxd.c
index 8429b98..c9e4c46 100644
--- a/src/xxd/xxd.c
+++ b/src/xxd/xxd.c
@@ -782,7 +782,6 @@
 	}
 
       p = 0;
-      c = 0;
       while ((length < 0 || p < length) && (c = getc_or_die(fp)) != EOF)
 	{
 	  FPRINTF_OR_DIE((fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X",