Patch 9.0.1216
Problem:    Coverity warns for ignoring return value.
Solution:   Break out of loop if function fails.
Files:      src/mbyte.c


*** ../vim-9.0.1215/src/mbyte.c 2023-01-17 18:31:20.427373305 +0000
--- src/mbyte.c 2023-01-18 12:43:47.599916287 +0000
***************
*** 5756,5766 ****
        list_T *entry = list_alloc();
        if (entry == NULL)
            break;
!       list_append_number(entry, (varnumber_T)cw_table[i].first);
!       list_append_number(entry, (varnumber_T)cw_table[i].last);
!       list_append_number(entry, (varnumber_T)cw_table[i].width);
! 
!       list_append_list(rettv->vval.v_list, entry);
      }
  }
  
--- 5756,5769 ----
        list_T *entry = list_alloc();
        if (entry == NULL)
            break;
!       if (list_append_number(entry, (varnumber_T)cw_table[i].first) == FAIL
!          || list_append_number(entry, (varnumber_T)cw_table[i].last) == FAIL
!          || list_append_number(entry, (varnumber_T)cw_table[i].width) == FAIL
!          || list_append_list(rettv->vval.v_list, entry) == FAIL)
!       {
!           list_free(entry);
!           break;
!       }
      }
  }
  
*** ../vim-9.0.1215/src/version.c       2023-01-17 21:38:22.138223711 +0000
--- src/version.c       2023-01-18 12:44:39.271887991 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1216,
  /**/

-- 
How To Keep A Healthy Level Of Insanity:
12. Sing along at the opera.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/20230118124601.2FB661C129B%40moolenaar.net.

Raspunde prin e-mail lui