comparison src/version.c @ 16764:ef00b6bc186b v8.1.1384

patch 8.1.1384: using "int" for alloc() often results in compiler warnings commit https://github.com/vim/vim/commit/964b3746b9c81e65887e2ac9a335f181db2bb592 Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 24 18:54:09 2019 +0200 patch 8.1.1384: using "int" for alloc() often results in compiler warnings Problem: Using "int" for alloc() often results in compiler warnings. Solution: Use "size_t" and remove type casts. Remove alloc_check(), Vim only works with 32 bit ints anyway.
author Bram Moolenaar <Bram@vim.org>
date Fri, 24 May 2019 19:00:07 +0200
parents 97ad98d95214
children d2deaaf21305
comparison
equal deleted inserted replaced
16763:fccf84413b53 16764:ef00b6bc186b
59 size_t len = strlen(msg) 59 size_t len = strlen(msg)
60 + strlen(VIM_VERSION_LONG_ONLY) 60 + strlen(VIM_VERSION_LONG_ONLY)
61 + strlen(VIM_VERSION_DATE_ONLY) 61 + strlen(VIM_VERSION_DATE_ONLY)
62 + strlen(date_time); 62 + strlen(date_time);
63 63
64 longVersion = (char *)alloc((unsigned)len); 64 longVersion = (char *)alloc(len);
65 if (longVersion == NULL) 65 if (longVersion == NULL)
66 longVersion = VIM_VERSION_LONG; 66 longVersion = VIM_VERSION_LONG;
67 else 67 else
68 vim_snprintf(longVersion, len, msg, 68 vim_snprintf(longVersion, len, msg,
69 VIM_VERSION_LONG_ONLY, VIM_VERSION_DATE_ONLY, date_time); 69 VIM_VERSION_LONG_ONLY, VIM_VERSION_DATE_ONLY, date_time);
765 NULL 765 NULL
766 }; 766 };
767 767
768 static int included_patches[] = 768 static int included_patches[] =
769 { /* Add new patch number below this line */ 769 { /* Add new patch number below this line */
770 /**/
771 1384,
770 /**/ 772 /**/
771 1383, 773 1383,
772 /**/ 774 /**/
773 1382, 775 1382,
774 /**/ 776 /**/