Skip to content

Commit 284c660

Browse files
committed
remove more unused C
1 parent 661a03e commit 284c660

2 files changed

Lines changed: 1 addition & 33 deletions

File tree

c/tests/test_core.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,6 @@ test_generate_uuid(void)
8383
CU_ASSERT_STRING_NOT_EQUAL(uuid, other_uuid);
8484
}
8585

86-
static void
87-
set_u64_le(uint8_t *dest, uint64_t value)
88-
{
89-
dest[0] = (uint8_t) (value & 0xFF);
90-
dest[1] = (uint8_t) ((value >> 8) & 0xFF);
91-
dest[2] = (uint8_t) ((value >> 16) & 0xFF);
92-
dest[3] = (uint8_t) ((value >> 24) & 0xFF);
93-
dest[4] = (uint8_t) ((value >> 32) & 0xFF);
94-
dest[5] = (uint8_t) ((value >> 40) & 0xFF);
95-
dest[6] = (uint8_t) ((value >> 48) & 0xFF);
96-
dest[7] = (uint8_t) ((value >> 56) & 0xFF);
97-
}
98-
9986
static void
10087
test_double_round(void)
10188
{

c/tskit/core.c

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@
3232
#include <kastore.h>
3333
#include <tskit/core.h>
3434

35-
#define UUID_NUM_BYTES 16
36-
#define TSK_JSON_BINARY_HEADER_SIZE 21
37-
38-
static const uint8_t _tsk_json_binary_magic[4] = { 'J', 'B', 'L', 'B' };
35+
#define UUID_NUM_BYTES 16
3936

4037
#if defined(_WIN32)
4138

@@ -98,22 +95,6 @@ get_random_bytes(uint8_t *buf)
9895

9996
#endif
10097

101-
static uint64_t
102-
tsk_load_u64_le(const uint8_t *p)
103-
{
104-
uint64_t value;
105-
106-
value = (uint64_t) p[0];
107-
value |= (uint64_t) p[1] << 8;
108-
value |= (uint64_t) p[2] << 16;
109-
value |= (uint64_t) p[3] << 24;
110-
value |= (uint64_t) p[4] << 32;
111-
value |= (uint64_t) p[5] << 40;
112-
value |= (uint64_t) p[6] << 48;
113-
value |= (uint64_t) p[7] << 56;
114-
return value;
115-
}
116-
11798
/* Generate a new UUID4 using a system-generated source of randomness.
11899
* Note that this function writes a NULL terminator to the end of this
119100
* string, so that the total length of the buffer must be 37 bytes.

0 commit comments

Comments
 (0)