src/string_list.c

changeset 101
0cb645809b1a
parent 99
094eff4cfc03
child 102
665b60727a89
--- a/src/string_list.c	Thu Jul 02 12:47:17 2026 +0200
+++ b/src/string_list.c	Sat Jul 04 11:10:51 2026 +0200
@@ -29,13 +29,14 @@
 #include <assert.h>
 
 static void do_not_free(void* item) {
+  (void) item; /* do not do anything with the item */
 }
 
 string_list* new_string_list() {
   string_list* stringList = malloc(sizeof(string_list));
   stringList->count = 0;
   stringList->capacity = 32;
-  stringList->items = calloc(sizeof(char*), stringList->capacity);
+  stringList->items = calloc(stringList->capacity, sizeof(char*));
   stringList->free_item = do_not_free;
 
   return stringList;

mercurial