mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Avoid conditional-uninitialised warning for tcp test.
The C compiler warns because the value is initialised in a loop and used outside of it. In this case, it's always initialised, but changing the value of `NUM_PORTS` can change that.
This commit is contained in:
parent
e4462af919
commit
64d115e52d
|
@ -58,7 +58,7 @@ START_TEST(test_basic)
|
||||||
ck_assert_msg(tcp_server_listen_count(tcp_s) == NUM_PORTS,
|
ck_assert_msg(tcp_server_listen_count(tcp_s) == NUM_PORTS,
|
||||||
"Failed to bind a TCP relay server to all %d attempted ports.", NUM_PORTS);
|
"Failed to bind a TCP relay server to all %d attempted ports.", NUM_PORTS);
|
||||||
|
|
||||||
Socket sock;
|
Socket sock = {0};
|
||||||
|
|
||||||
// Check all opened ports for connectivity.
|
// Check all opened ports for connectivity.
|
||||||
for (uint8_t i = 0; i < NUM_PORTS; i++) {
|
for (uint8_t i = 0; i < NUM_PORTS; i++) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user