summaryrefslogtreecommitdiffstats
path: root/src/quickfix.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/quickfix.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/quickfix.c')
-rw-r--r--src/quickfix.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index cf3b274843..46eae2dd28 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -1346,7 +1346,7 @@ qf_parse_multiline_pfx(
if (*fields->errmsg && !qfl->qf_multiignore)
{
len = (int)STRLEN(qfprev->qf_text);
- if ((ptr = alloc((unsigned)(len + STRLEN(fields->errmsg) + 2)))
+ if ((ptr = alloc(len + STRLEN(fields->errmsg) + 2))
== NULL)
return QF_FAIL;
STRCPY(ptr, qfprev->qf_text);
@@ -1890,7 +1890,7 @@ locstack_queue_delreq(qf_info_T *qi)
{
qf_delq_T *q;
- q = (qf_delq_T *)alloc((unsigned)sizeof(qf_delq_T));
+ q = (qf_delq_T *)alloc(sizeof(qf_delq_T));
if (q != NULL)
{
q->qi = qi;
@@ -2063,7 +2063,7 @@ qf_add_entry(
qfline_T *qfp;
qfline_T **lastp; // pointer to qf_last or NULL
- if ((qfp = (qfline_T *)alloc((unsigned)sizeof(qfline_T))) == NULL)
+ if ((qfp = (qfline_T *)alloc(sizeof(qfline_T))) == NULL)
return QF_FAIL;
if (bufnum != 0)
{
@@ -2429,7 +2429,7 @@ qf_push_dir(char_u *dirbuf, struct dir_stack_T **stackptr, int is_file_stack)
struct dir_stack_T *ds_ptr;
// allocate new stack element and hook it in
- ds_new = (struct dir_stack_T *)alloc((unsigned)sizeof(struct dir_stack_T));
+ ds_new = (struct dir_stack_T *)alloc(sizeof(struct dir_stack_T));
if (ds_new == NULL)
return NULL;
@@ -4707,7 +4707,7 @@ get_mef_name(void)
else
off += 19;
- name = alloc((unsigned)STRLEN(p_mef) + 30);
+ name = alloc(STRLEN(p_mef) + 30);
if (name == NULL)
break;
STRCPY(name, p_mef);