summaryrefslogtreecommitdiffstats
path: root/src/os_mswin.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-24 18:54:09 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-24 18:54:09 +0200
commit964b3746b9c81e65887e2ac9a335f181db2bb592 (patch)
tree9afaaac41a1c4f71b359fd6706b88df00e22e7a1 /src/os_mswin.c
parentd33a764123a8aedb20cd84aeff3b94810ee67c4c (diff)
patch 8.1.1384: using "int" for alloc() often results in compiler warningsv8.1.1384
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.
Diffstat (limited to 'src/os_mswin.c')
-rw-r--r--src/os_mswin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/os_mswin.c b/src/os_mswin.c
index fc6806d88b..67989fe28c 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -1466,8 +1466,8 @@ mch_print_init(prt_settings_T *psettings, char_u *jobname, int forceit)
char_u *port_name = utf16_to_enc(wport_name, NULL);
if (printer_name != NULL && port_name != NULL)
- prt_name = alloc((unsigned)(STRLEN(printer_name)
- + STRLEN(port_name) + STRLEN(text)));
+ prt_name = alloc(STRLEN(printer_name)
+ + STRLEN(port_name) + STRLEN(text));
if (prt_name != NULL)
wsprintf((char *)prt_name, (const char *)text,
printer_name, port_name);
@@ -2111,7 +2111,7 @@ Messaging_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
char *err = _(e_invexprmsg);
size_t len = STRLEN(str) + STRLEN(err) + 5;
- res = alloc((unsigned)len);
+ res = alloc(len);
if (res != NULL)
vim_snprintf((char *)res, len, "%s: \"%s\"", err, str);
reply.dwData = COPYDATA_ERROR_RESULT;
@@ -2340,7 +2340,7 @@ serverSetName(char_u *name)
char_u *p;
/* Leave enough space for a 9-digit suffix to ensure uniqueness! */
- ok_name = alloc((unsigned)STRLEN(name) + 10);
+ ok_name = alloc(STRLEN(name) + 10);
STRCPY(ok_name, name);
p = ok_name + STRLEN(name);