summaryrefslogtreecommitdiff
path: root/crc
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-04-01 21:10:36 -0600
committerJens Axboe <axboe@fb.com>2014-04-01 21:10:36 -0600
commit10aa136bddbaa7c845ab4eacb4a9a4a88d6657a3 (patch)
tree5b638cba41ce8c627ab693bdff3a7d08382554fb /crc
parentef799a64618cbd53adb50d615666cd7afe9f0a8f (diff)
downloadfio-10aa136bddbaa7c845ab4eacb4a9a4a88d6657a3.tar.gz
fio-10aa136bddbaa7c845ab4eacb4a9a4a88d6657a3.tar.bz2
Cleanup symbols that should be static
Run analysis on symbols not used outside of their current file, turn them into statics. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'crc')
-rw-r--r--crc/crc32c.c2
-rw-r--r--crc/xxhash.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/crc/crc32c.c b/crc/crc32c.c
index b830b9fe..f6fc6887 100644
--- a/crc/crc32c.c
+++ b/crc/crc32c.c
@@ -32,6 +32,8 @@
*/
#include <inttypes.h>
+#include "crc32c.h"
+
/*
* This is the CRC-32C table
* Generated with:
diff --git a/crc/xxhash.c b/crc/xxhash.c
index db7890b0..eedaecb4 100644
--- a/crc/xxhash.c
+++ b/crc/xxhash.c
@@ -148,7 +148,7 @@ typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess;
//****************************
typedef enum { XXH_aligned, XXH_unaligned } XXH_alignment;
-uint32_t XXH_readLE32_align(const uint32_t* ptr, XXH_endianess endian, XXH_alignment align)
+static uint32_t XXH_readLE32_align(const uint32_t* ptr, XXH_endianess endian, XXH_alignment align)
{
if (align==XXH_unaligned)
return endian==XXH_littleEndian ? A32(ptr) : XXH_swap32(A32(ptr));
@@ -156,13 +156,13 @@ uint32_t XXH_readLE32_align(const uint32_t* ptr, XXH_endianess endian, XXH_align
return endian==XXH_littleEndian ? *ptr : XXH_swap32(*ptr);
}
-uint32_t XXH_readLE32(const uint32_t* ptr, XXH_endianess endian) { return XXH_readLE32_align(ptr, endian, XXH_unaligned); }
+static uint32_t XXH_readLE32(const uint32_t* ptr, XXH_endianess endian) { return XXH_readLE32_align(ptr, endian, XXH_unaligned); }
//****************************
// Simple Hash Functions
//****************************
-uint32_t XXH32_endian_align(const void* input, int len, uint32_t seed, XXH_endianess endian, XXH_alignment align)
+static uint32_t XXH32_endian_align(const void* input, int len, uint32_t seed, XXH_endianess endian, XXH_alignment align)
{
const uint8_t *p = (const uint8_t *)input;
const uint8_t * const bEnd = p + len;
@@ -282,7 +282,7 @@ void* XXH32_init (uint32_t seed)
}
-XXH_errorcode XXH32_update_endian (void* state_in, const void* input, int len, XXH_endianess endian)
+static XXH_errorcode XXH32_update_endian (void* state_in, const void* input, int len, XXH_endianess endian)
{
struct XXH_state32_t * state = (struct XXH_state32_t *) state_in;
const uint8_t *p = (const uint8_t *)input;
@@ -358,7 +358,7 @@ XXH_errorcode XXH32_update (void* state_in, const void* input, int len)
-uint32_t XXH32_intermediateDigest_endian (void* state_in, XXH_endianess endian)
+static uint32_t XXH32_intermediateDigest_endian (void* state_in, XXH_endianess endian)
{
struct XXH_state32_t * state = (struct XXH_state32_t *) state_in;
const uint8_t *p = (const uint8_t *)state->memory;