[glib/wip/pwithnall/restore-macos-ci] tests: Remove unused function from slice-memchunk.c



commit 5da12275c6407fcc8f71477e811fe074b2dc2529
Author: Philip Withnall <pwithnall endlessos org>
Date:   Fri May 27 15:30:44 2022 +0100

    tests: Remove unused function from slice-memchunk.c
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 glib/tests/slice-memchunk.c | 13 -------------
 1 file changed, 13 deletions(-)
---
diff --git a/glib/tests/slice-memchunk.c b/glib/tests/slice-memchunk.c
index 0938eb96f8..e3443a4d91 100644
--- a/glib/tests/slice-memchunk.c
+++ b/glib/tests/slice-memchunk.c
@@ -29,7 +29,6 @@ static guint    prime_size = 1021; /* 769; 509 */
 static gboolean clean_memchunks = FALSE;
 static guint    number_of_blocks = 10000;          /* total number of blocks allocated */
 static guint    number_of_repetitions = 10000;     /* number of alloc+free repetitions */
-static gboolean want_corruption = FALSE;
 
 /* --- old memchunk prototypes (memchunks.c) --- */
 GMemChunk*      old_mem_chunk_new       (const gchar  *name,
@@ -51,18 +50,6 @@ void            old_mem_chunk_info      (void);
 #endif
 
 /* --- functions --- */
-static inline int
-corruption (void)
-{
-  if (G_UNLIKELY (want_corruption))
-    {
-      /* corruption per call likelyness is about 1:4000000 */
-      guint32 r = g_random_int() % 8000009;
-      return r == 277 ? +1 : r == 281 ? -1 : 0;
-    }
-  return 0;
-}
-
 static inline gpointer
 memchunk_alloc (GMemChunk **memchunkp,
                 guint       size)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]