Fix missing-prototype errors in sample programs
Signed-off-by: Michael Schuster <michael@schuster.ms>
diff --git a/programs/test/metatest.c b/programs/test/metatest.c
index 75829ec..9d90d8c 100644
--- a/programs/test/metatest.c
+++ b/programs/test/metatest.c
@@ -76,13 +76,13 @@
/* Test framework features */
/****************************************************************/
-void meta_test_fail(const char *name)
+static void meta_test_fail(const char *name)
{
(void) name;
mbedtls_test_fail("Forced test failure", __LINE__, __FILE__);
}
-void meta_test_not_equal(const char *name)
+static void meta_test_not_equal(const char *name)
{
int left = 20;
int right = 10;
@@ -94,7 +94,7 @@
;
}
-void meta_test_not_le_s(const char *name)
+static void meta_test_not_le_s(const char *name)
{
int left = 20;
int right = 10;
@@ -106,7 +106,7 @@
;
}
-void meta_test_not_le_u(const char *name)
+static void meta_test_not_le_u(const char *name)
{
size_t left = 20;
size_t right = 10;
@@ -122,7 +122,7 @@
/* Platform features */
/****************************************************************/
-void null_pointer_dereference(const char *name)
+static void null_pointer_dereference(const char *name)
{
(void) name;
volatile char *volatile p;
@@ -131,7 +131,7 @@
mbedtls_printf("%p -> %u\n", p, (unsigned) *p);
}
-void null_pointer_call(const char *name)
+static void null_pointer_call(const char *name)
{
(void) name;
unsigned(*volatile p)(void);
@@ -148,7 +148,7 @@
/* Memory */
/****************************************************************/
-void read_after_free(const char *name)
+static void read_after_free(const char *name)
{
(void) name;
volatile char *p = calloc_but_the_compiler_does_not_know(1, 1);
@@ -158,7 +158,7 @@
mbedtls_printf("%u\n", (unsigned) *p);
}
-void double_free(const char *name)
+static void double_free(const char *name)
{
(void) name;
volatile char *p = calloc_but_the_compiler_does_not_know(1, 1);
@@ -168,7 +168,7 @@
free_but_the_compiler_does_not_know((void *) p);
}
-void read_uninitialized_stack(const char *name)
+static void read_uninitialized_stack(const char *name)
{
(void) name;
char buf[1];
@@ -182,7 +182,7 @@
}
}
-void memory_leak(const char *name)
+static void memory_leak(const char *name)
{
(void) name;
volatile char *p = calloc_but_the_compiler_does_not_know(1, 1);
@@ -196,7 +196,7 @@
* %(start), %(offset) and %(count) are decimal integers.
* %(direction) is either the character 'r' for read or 'w' for write.
*/
-void test_memory_poison(const char *name)
+static void test_memory_poison(const char *name)
{
size_t start = 0, offset = 0, count = 0;
char direction = 'r';
@@ -254,7 +254,7 @@
/* Threading */
/****************************************************************/
-void mutex_lock_not_initialized(const char *name)
+static void mutex_lock_not_initialized(const char *name)
{
(void) name;
#if defined(MBEDTLS_THREADING_C)
@@ -270,7 +270,7 @@
#endif
}
-void mutex_unlock_not_initialized(const char *name)
+static void mutex_unlock_not_initialized(const char *name)
{
(void) name;
#if defined(MBEDTLS_THREADING_C)
@@ -286,7 +286,7 @@
#endif
}
-void mutex_free_not_initialized(const char *name)
+static void mutex_free_not_initialized(const char *name)
{
(void) name;
#if defined(MBEDTLS_THREADING_C)
@@ -300,7 +300,7 @@
#endif
}
-void mutex_double_init(const char *name)
+static void mutex_double_init(const char *name)
{
(void) name;
#if defined(MBEDTLS_THREADING_C)
@@ -315,7 +315,7 @@
#endif
}
-void mutex_double_free(const char *name)
+static void mutex_double_free(const char *name)
{
(void) name;
#if defined(MBEDTLS_THREADING_C)
@@ -330,7 +330,7 @@
#endif
}
-void mutex_leak(const char *name)
+static void mutex_leak(const char *name)
{
(void) name;
#if defined(MBEDTLS_THREADING_C)