Patch 7.4.1270
Problem:    Warnings for missing values in switch.
Solution:   Change switch to if-else or add values.
Files:      src/if_py_both.h, src/if_python.c, src/if_python3.c


*** ../vim-7.4.1269/src/if_py_both.h    2016-01-23 19:45:48.622931332 +0100
--- src/if_py_both.h    2016-02-06 19:52:17.484367234 +0100
***************
*** 5831,5841 ****
        }
        /* As we are not using copy_tv which increments reference count we must
         * do it ourself. */
!       switch(tv->v_type)
!       {
!           case VAR_DICT: ++tv->vval.v_dict->dv_refcount; break;
!           case VAR_LIST: ++tv->vval.v_list->lv_refcount; break;
!       }
      }
      else
      {
--- 5831,5840 ----
        }
        /* As we are not using copy_tv which increments reference count we must
         * do it ourself. */
!       if (tv->v_type == VAR_DICT)
!           ++tv->vval.v_dict->dv_refcount;
!       else if (tv->v_type == VAR_LIST)
!           ++tv->vval.v_list->lv_refcount;
      }
      else
      {
*** ../vim-7.4.1269/src/if_python.c     2016-01-30 17:24:01.798502450 +0100
--- src/if_python.c     2016-02-06 19:54:00.655299639 +0100
***************
*** 1556,1561 ****
--- 1556,1567 ----
            rettv->v_type = VAR_NUMBER;
            rettv->vval.v_number = 0;
            break;
+       case VAR_NUMBER:
+       case VAR_STRING:
+       case VAR_FLOAT:
+       case VAR_JOB:
+       case VAR_SPECIAL:
+           break;
      }
  }
  
*** ../vim-7.4.1269/src/if_python3.c    2016-01-30 17:24:01.798502450 +0100
--- src/if_python3.c    2016-02-06 19:56:23.765818687 +0100
***************
*** 1649,1654 ****
--- 1649,1660 ----
            rettv->v_type = VAR_NUMBER;
            rettv->vval.v_number = 0;
            break;
+       case VAR_NUMBER:
+       case VAR_STRING:
+       case VAR_FLOAT:
+       case VAR_JOB:
+       case VAR_SPECIAL:
+           break;
      }
  }
  
*** ../vim-7.4.1269/src/version.c       2016-02-06 18:42:01.651993383 +0100
--- src/version.c       2016-02-06 19:54:29.938996608 +0100
***************
*** 744,745 ****
--- 744,747 ----
  {   /* Add new patch number below this line */
+ /**/
+     1270,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
161. You get up before the sun rises to check your e-mail, and you
     find yourself in the very same chair long after the sun has set.

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui