diff src/alloc.c @ 27018:268f6a3511df v8.2.4038

patch 8.2.4038: various code not used when features are disabled Commit: https://github.com/vim/vim/commit/748b308eebe8d8860888eb27da08333f175d547d Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Sat Jan 8 12:41:16 2022 +0000 patch 8.2.4038: various code not used when features are disabled Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pell?, closes https://github.com/vim/vim/issues/9491)
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Jan 2022 13:45:04 +0100
parents 6ee19c6ae8a2
children eebbcc83fb75
line wrap: on
line diff
--- 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 UNUS
 #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 i
 #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->ga_len = from->ga_len;
     return OK;
 }
+#endif
 
 /*
  * Initialize a growing array.	Don't forget to set ga_itemsize and