summaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorDominique Pelle <dominique.pelle@gmail.com>2022-01-08 12:41:16 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-08 12:41:16 +0000
commit748b308eebe8d8860888eb27da08333f175d547d (patch)
treedcb524e3faab88b0238bd892cdfa2870252c7e51 /src/alloc.c
parent370791465e745354d66696de8cbd15504cf958c0 (diff)
patch 8.2.4038: various code not used when features are disabledv8.2.4038
Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pellé, closes #9491)
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index cb781b0779..3651a2e599 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -151,6 +151,7 @@ alloc(size_t size)
return lalloc(size, TRUE);
}
+#if defined(FEAT_QUICKFIX) || defined(PROTO)
/*
* alloc() with an ID for alloc_fail().
*/
@@ -163,6 +164,7 @@ alloc_id(size_t size, alloc_id_T id UNUSED)
#endif
return lalloc(size, TRUE);
}
+#endif
/*
* Allocate memory and set all bytes to zero.
@@ -178,6 +180,7 @@ alloc_clear(size_t size)
return p;
}
+#if defined(FEAT_SIGNS) || defined(PROTO)
/*
* Same as alloc_clear() but with allocation id for testing
*/
@@ -190,6 +193,7 @@ alloc_clear_id(size_t size, alloc_id_T id UNUSED)
#endif
return alloc_clear(size);
}
+#endif
/*
* Allocate memory like lalloc() and set all bytes to zero.
@@ -648,6 +652,7 @@ ga_clear_strings(garray_T *gap)
ga_clear(gap);
}
+#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Copy a growing array that contains a list of strings.
*/
@@ -682,6 +687,7 @@ ga_copy_strings(garray_T *from, garray_T *to)
to->ga_len = from->ga_len;
return OK;
}
+#endif
/*
* Initialize a growing array. Don't forget to set ga_itemsize and