Patch 8.2.0579
Problem:    Coverity warns for unused value.
Solution:   Change order and use "else if".
Files:      src/os_unix.c


*** ../vim-8.2.0578/src/os_unix.c       2020-04-05 21:42:09.285006966 +0200
--- src/os_unix.c       2020-04-14 20:53:36.890507922 +0200
***************
*** 5491,5503 ****
                term = getenv("TERM");
  #endif
            // Use 'term' or $TERM if it starts with "xterm", otherwise fall
!           // back to "xterm".
            if (term == NULL || *term == NUL || STRNCMP(term, "xterm", 5) != 0)
            {
-               if (t_colors > 16)
-                   term = "xterm-color";
                if (t_colors >= 256)
                    term = "xterm-256color";
                else
                    term = "xterm";
            }
--- 5491,5504 ----
                term = getenv("TERM");
  #endif
            // Use 'term' or $TERM if it starts with "xterm", otherwise fall
!           // back to "xterm" or "xterm-color".
            if (term == NULL || *term == NUL || STRNCMP(term, "xterm", 5) != 0)
            {
                if (t_colors >= 256)
+                   // TODO: should we check this name is supported?
                    term = "xterm-256color";
+               else if (t_colors > 16)
+                   term = "xterm-color";
                else
                    term = "xterm";
            }
*** ../vim-8.2.0578/src/version.c       2020-04-14 20:15:45.288566185 +0200
--- src/version.c       2020-04-14 20:54:24.046355620 +0200
***************
*** 748,749 ****
--- 748,751 ----
  {   /* Add new patch number below this line */
+ /**/
+     579,
  /**/

-- 
Bad programs can be written in any language.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202004141857.03EIv5D7031669%40masaka.moolenaar.net.

Raspunde prin e-mail lui