diff options
-rw-r--r-- | auto_tests/TCP_test.c | 6 | ||||
-rw-r--r-- | auto_tests/encryptsave_test.c | 1 | ||||
-rw-r--r-- | auto_tests/tox_test.c | 4 | ||||
-rw-r--r-- | auto_tests/toxav_basic_test.c | 1 | ||||
-rw-r--r-- | auto_tests/toxav_many_test.c | 1 | ||||
-rw-r--r-- | other/bootstrap_daemon/src/log.c | 2 | ||||
-rw-r--r-- | testing/DHT_test.c | 2 | ||||
-rw-r--r-- | toxav/msi.c | 3 | ||||
-rw-r--r-- | toxcore/Messenger.c | 1 | ||||
-rw-r--r-- | toxcore/network.c | 2 |
10 files changed, 8 insertions, 15 deletions
diff --git a/auto_tests/TCP_test.c b/auto_tests/TCP_test.c index 6a721b43..05f42a6a 100644 --- a/auto_tests/TCP_test.c +++ b/auto_tests/TCP_test.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #define NUM_PORTS 3 | 26 | #define NUM_PORTS 3 |
27 | 27 | ||
28 | uint16_t ports[NUM_PORTS] = {1234, 33445, 25643}; | 28 | static uint16_t ports[NUM_PORTS] = {1234, 33445, 25643}; |
29 | 29 | ||
30 | START_TEST(test_basic) | 30 | START_TEST(test_basic) |
31 | { | 31 | { |
@@ -522,7 +522,7 @@ END_TEST | |||
522 | 522 | ||
523 | #include "../toxcore/TCP_connection.h" | 523 | #include "../toxcore/TCP_connection.h" |
524 | 524 | ||
525 | bool tcp_data_callback_called; | 525 | static bool tcp_data_callback_called; |
526 | static int tcp_data_callback(void *object, int id, const uint8_t *data, uint16_t length, void *userdata) | 526 | static int tcp_data_callback(void *object, int id, const uint8_t *data, uint16_t length, void *userdata) |
527 | { | 527 | { |
528 | if (object != (void *)120397) { | 528 | if (object != (void *)120397) { |
@@ -632,7 +632,7 @@ START_TEST(test_tcp_connection) | |||
632 | } | 632 | } |
633 | END_TEST | 633 | END_TEST |
634 | 634 | ||
635 | bool tcp_oobdata_callback_called; | 635 | static bool tcp_oobdata_callback_called; |
636 | static int tcp_oobdata_callback(void *object, const uint8_t *public_key, unsigned int id, const uint8_t *data, | 636 | static int tcp_oobdata_callback(void *object, const uint8_t *public_key, unsigned int id, const uint8_t *data, |
637 | uint16_t length, void *userdata) | 637 | uint16_t length, void *userdata) |
638 | { | 638 | { |
diff --git a/auto_tests/encryptsave_test.c b/auto_tests/encryptsave_test.c index f1e768d6..5841f43f 100644 --- a/auto_tests/encryptsave_test.c +++ b/auto_tests/encryptsave_test.c | |||
@@ -59,7 +59,6 @@ START_TEST(test_save_friend) | |||
59 | Tox *tox1 = tox_new(0, 0); | 59 | Tox *tox1 = tox_new(0, 0); |
60 | Tox *tox2 = tox_new(0, 0); | 60 | Tox *tox2 = tox_new(0, 0); |
61 | ck_assert_msg(tox1 || tox2, "Failed to create 2 tox instances"); | 61 | ck_assert_msg(tox1 || tox2, "Failed to create 2 tox instances"); |
62 | uint32_t to_compare = 974536; | ||
63 | tox_callback_friend_request(tox2, accept_friend_request); | 62 | tox_callback_friend_request(tox2, accept_friend_request); |
64 | uint8_t address[TOX_ADDRESS_SIZE]; | 63 | uint8_t address[TOX_ADDRESS_SIZE]; |
65 | tox_self_get_address(tox2, address); | 64 | tox_self_get_address(tox2, address); |
diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index 0f93eab0..a5745fe8 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c | |||
@@ -1384,9 +1384,9 @@ group_test_restart: | |||
1384 | END_TEST | 1384 | END_TEST |
1385 | 1385 | ||
1386 | #ifdef TRAVIS_ENV | 1386 | #ifdef TRAVIS_ENV |
1387 | uint8_t timeout_mux = 20; | 1387 | static const uint8_t timeout_mux = 20; |
1388 | #else | 1388 | #else |
1389 | uint8_t timeout_mux = 10; | 1389 | static const uint8_t timeout_mux = 10; |
1390 | #endif | 1390 | #endif |
1391 | 1391 | ||
1392 | static Suite *tox_suite(void) | 1392 | static Suite *tox_suite(void) |
diff --git a/auto_tests/toxav_basic_test.c b/auto_tests/toxav_basic_test.c index da874849..1043c9be 100644 --- a/auto_tests/toxav_basic_test.c +++ b/auto_tests/toxav_basic_test.c | |||
@@ -169,7 +169,6 @@ START_TEST(test_AV_flows) | |||
169 | printf("Preparing network...\n"); | 169 | printf("Preparing network...\n"); |
170 | long long unsigned int cur_time = time(NULL); | 170 | long long unsigned int cur_time = time(NULL); |
171 | 171 | ||
172 | uint32_t to_compare = 974536; | ||
173 | uint8_t address[TOX_ADDRESS_SIZE]; | 172 | uint8_t address[TOX_ADDRESS_SIZE]; |
174 | 173 | ||
175 | tox_callback_friend_request(Alice, t_accept_friend_request_cb); | 174 | tox_callback_friend_request(Alice, t_accept_friend_request_cb); |
diff --git a/auto_tests/toxav_many_test.c b/auto_tests/toxav_many_test.c index bdb5445b..fec2a1de 100644 --- a/auto_tests/toxav_many_test.c +++ b/auto_tests/toxav_many_test.c | |||
@@ -235,7 +235,6 @@ START_TEST(test_AV_three_calls) | |||
235 | printf("Preparing network...\n"); | 235 | printf("Preparing network...\n"); |
236 | long long unsigned int cur_time = time(NULL); | 236 | long long unsigned int cur_time = time(NULL); |
237 | 237 | ||
238 | uint32_t to_compare = 974536; | ||
239 | uint8_t address[TOX_ADDRESS_SIZE]; | 238 | uint8_t address[TOX_ADDRESS_SIZE]; |
240 | 239 | ||
241 | tox_callback_friend_request(Alice, t_accept_friend_request_cb); | 240 | tox_callback_friend_request(Alice, t_accept_friend_request_cb); |
diff --git a/other/bootstrap_daemon/src/log.c b/other/bootstrap_daemon/src/log.c index e0fb3b33..2eae3286 100644 --- a/other/bootstrap_daemon/src/log.c +++ b/other/bootstrap_daemon/src/log.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <stdarg.h> | 31 | #include <stdarg.h> |
32 | #include <stdio.h> | 32 | #include <stdio.h> |
33 | 33 | ||
34 | LOG_BACKEND current_backend = -1; | 34 | static LOG_BACKEND current_backend = -1; |
35 | 35 | ||
36 | bool open_log(LOG_BACKEND backend) | 36 | bool open_log(LOG_BACKEND backend) |
37 | { | 37 | { |
diff --git a/testing/DHT_test.c b/testing/DHT_test.c index df4b0c83..c9223546 100644 --- a/testing/DHT_test.c +++ b/testing/DHT_test.c | |||
@@ -52,7 +52,7 @@ | |||
52 | 52 | ||
53 | #define PORT 33445 | 53 | #define PORT 33445 |
54 | 54 | ||
55 | uint8_t zeroes_cid[crypto_box_PUBLICKEYBYTES]; | 55 | static uint8_t zeroes_cid[crypto_box_PUBLICKEYBYTES]; |
56 | 56 | ||
57 | static void print_client_id(uint8_t *public_key) | 57 | static void print_client_id(uint8_t *public_key) |
58 | { | 58 | { |
diff --git a/toxav/msi.c b/toxav/msi.c index d80d7c76..39086567 100644 --- a/toxav/msi.c +++ b/toxav/msi.c | |||
@@ -384,7 +384,6 @@ int msg_parse_in(Logger *log, MSIMessage *dest, const uint8_t *data, uint16_t le | |||
384 | default: | 384 | default: |
385 | LOGGER_ERROR(log, "Invalid id byte"); | 385 | LOGGER_ERROR(log, "Invalid id byte"); |
386 | return -1; | 386 | return -1; |
387 | break; | ||
388 | } | 387 | } |
389 | } | 388 | } |
390 | 389 | ||
@@ -689,7 +688,6 @@ void handle_init(MSICall *call, const MSIMessage *msg) | |||
689 | call->error = msi_EInvalidState; | 688 | call->error = msi_EInvalidState; |
690 | goto FAILURE; | 689 | goto FAILURE; |
691 | } | 690 | } |
692 | break; | ||
693 | } | 691 | } |
694 | 692 | ||
695 | return; | 693 | return; |
@@ -771,7 +769,6 @@ void handle_pop(MSICall *call, const MSIMessage *msg) | |||
771 | LOGGER_ERROR(call->session->messenger->log, "Handling what should be impossible case"); | 769 | LOGGER_ERROR(call->session->messenger->log, "Handling what should be impossible case"); |
772 | abort(); | 770 | abort(); |
773 | } | 771 | } |
774 | break; | ||
775 | 772 | ||
776 | case msi_CallActive: { | 773 | case msi_CallActive: { |
777 | /* Hangup */ | 774 | /* Hangup */ |
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 64f9e92a..8969f83d 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -2915,7 +2915,6 @@ static int messenger_load_state_callback(void *outer, const uint8_t *data, uint3 | |||
2915 | } | 2915 | } |
2916 | 2916 | ||
2917 | return -2; | 2917 | return -2; |
2918 | break; | ||
2919 | } | 2918 | } |
2920 | 2919 | ||
2921 | #ifdef TOX_DEBUG | 2920 | #ifdef TOX_DEBUG |
diff --git a/toxcore/network.c b/toxcore/network.c index eea33328..e20f4c01 100644 --- a/toxcore/network.c +++ b/toxcore/network.c | |||
@@ -460,7 +460,7 @@ void networking_poll(Networking_Core *net, void *userdata) | |||
460 | #include <sodium.h> | 460 | #include <sodium.h> |
461 | #endif | 461 | #endif |
462 | 462 | ||
463 | uint8_t at_startup_ran = 0; | 463 | static uint8_t at_startup_ran = 0; |
464 | int networking_at_startup(void) | 464 | int networking_at_startup(void) |
465 | { | 465 | { |
466 | if (at_startup_ran != 0) { | 466 | if (at_startup_ran != 0) { |