Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,9 @@ if (BUILD_TESTING)
-Wshadow -Wcast-align -Wwrite-strings -Wformat-security
-Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-deprecated -std=gnu99
)
if (UNSAFE_TREAT_WARNINGS_AS_ERRORS)
target_compile_options(${test_case_name} PRIVATE -Werror)
endif()
if (S2N_LTO)
target_compile_options(${test_case_name} PRIVATE -flto)
endif()
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/s2n_safety_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static int success_memcpy()

static int failure_memcpy()
{
char src[1024];
char src[1024] = {0};
char *ptr = NULL;

POSIX_CHECKED_MEMCPY(ptr, src, 1024);
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/s2n_tls12_handshake_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ int main(int argc, char **argv)
{
struct s2n_connection *conn = s2n_connection_new(S2N_CLIENT);
conn->actual_protocol_version = S2N_TLS12;
EXPECT_EQUAL(ACTIVE_STATE_MACHINE(conn), state_machine);
EXPECT_EQUAL(ACTIVE_HANDSHAKES(conn), handshakes);
EXPECT_EQUAL(&ACTIVE_STATE_MACHINE(conn)[0], &state_machine[0]);
EXPECT_EQUAL(&ACTIVE_HANDSHAKES(conn)[0], &handshakes[0]);
EXPECT_SUCCESS(s2n_connection_free(conn));
};

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/s2n_tls13_handshake_state_machine_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ int main(int argc, char **argv)
struct s2n_connection *conn = s2n_connection_new(S2N_CLIENT);
conn->actual_protocol_version = S2N_TLS13;
EXPECT_OK(s2n_conn_choose_state_machine(conn, S2N_TLS13));
EXPECT_EQUAL(ACTIVE_STATE_MACHINE(conn), tls13_state_machine);
EXPECT_EQUAL(ACTIVE_HANDSHAKES(conn), tls13_handshakes);
EXPECT_EQUAL(&ACTIVE_STATE_MACHINE(conn)[0], &tls13_state_machine[0]);
EXPECT_EQUAL(&ACTIVE_HANDSHAKES(conn)[0], &tls13_handshakes[0]);
EXPECT_SUCCESS(s2n_connection_free(conn));
};

Expand Down
Loading