Commit 52ee547648923398015add10e0e9490ce3226ec7

Guillem Jover 2021-02-19T07:13:51

Declare local functions as static Warned-by: gcc

diff --git a/test/md5.c b/test/md5.c
index 345c257..c635c77 100644
--- a/test/md5.c
+++ b/test/md5.c
@@ -36,7 +36,7 @@
 
 DEF_TEST_DIGEST(MD5, MD5)
 
-void
+static void
 test_MD5_aladdin(const char *hash_str_ref, const char *data)
 {
 	uint8_t hash_bin_ref[MD5_DIGEST_LENGTH];
@@ -46,12 +46,12 @@ test_MD5_aladdin(const char *hash_str_ref, const char *data)
 	hex2bin(hash_bin_ref, hash_str_ref, MD5_DIGEST_LENGTH);
 
 	md5_init(&pms);
-	md5_append(&pms, data, strlen(data));
+	md5_append(&pms, (const uint8_t *)data, strlen(data));
 	md5_finish(&pms, hash_bin_got);
 	assert(memcmp(hash_bin_ref, hash_bin_got, MD5_DIGEST_LENGTH) == 0);
 }
 
-void
+static void
 test_MD5_all(const char *hash_str_ref, const char *data)
 {
 	test_MD5(hash_str_ref, data);
diff --git a/test/test.h b/test/test.h
index fb3780d..e937ea3 100644
--- a/test/test.h
+++ b/test/test.h
@@ -52,7 +52,7 @@ hex2bin(uint8_t *bin, const char *str, size_t bin_len)
 }
 
 #define DEF_TEST_DIGEST(name, type) \
-void \
+static void \
 test_##name(const char *hash_str_ref, const char *data) \
 { \
 	uint8_t hash_bin_ref[name##_DIGEST_LENGTH]; \