Problem: internal functions present in header file

Solution: remove declaration and make functions static
This commit is contained in:
Simon Giesecke 2019-03-23 07:55:01 -04:00
parent 5d74eba64a
commit a62e9d35be
2 changed files with 2 additions and 7 deletions

View File

@ -124,7 +124,7 @@ void recv_string_expect_success (void *socket_, const char *str_, int flags_)
TEST_ASSERT_EQUAL_STRING_LEN (str_, buffer, len);
}
void *internal_manage_test_context (bool init_, bool clear_)
static void *internal_manage_test_context (bool init_, bool clear_)
{
static void *test_context = NULL;
if (clear_) {
@ -141,7 +141,7 @@ void *internal_manage_test_context (bool init_, bool clear_)
return test_context;
}
void internal_manage_test_sockets (void *socket_, bool add_)
static void internal_manage_test_sockets (void *socket_, bool add_)
{
static void *test_sockets[MAX_TEST_SOCKETS];
static size_t test_socket_count = 0;

View File

@ -101,13 +101,8 @@ void recv_array_expect_success (void *socket_,
TEST_ASSERT_EQUAL_UINT8_ARRAY (array_, buffer, SIZE);
}
// do not call from tests directly, use setup_test_context, get_test_context and teardown_test_context only
void *internal_manage_test_context (bool init_, bool clear_);
#define MAX_TEST_SOCKETS 128
void internal_manage_test_sockets (void *socket_, bool add_);
void setup_test_context ();
void *get_test_context ();