diff options
author | Leonid Bobrov <mazocomp@disroot.org> | 2018-08-16 10:09:12 +0300 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-08-16 09:57:37 +0000 |
commit | 006b4f4e5c3579428ff02ab954bf78a913df9e5a (patch) | |
tree | c68c3aec191b115fe73c8df7399468ae0edec222 /auto_tests | |
parent | 3036cc1f23cef20885db3652972c102e7405d178 (diff) |
Prune long long warnings.
Diffstat (limited to 'auto_tests')
-rw-r--r-- | auto_tests/file_saving_test.c | 2 | ||||
-rw-r--r-- | auto_tests/friend_request_test.c | 6 | ||||
-rw-r--r-- | auto_tests/save_load_test.c | 10 | ||||
-rw-r--r-- | auto_tests/set_name_test.c | 6 | ||||
-rw-r--r-- | auto_tests/set_status_message_test.c | 6 | ||||
-rw-r--r-- | auto_tests/tox_many_test.c | 2 | ||||
-rw-r--r-- | auto_tests/toxav_many_test.c | 4 | ||||
-rw-r--r-- | auto_tests/typing_test.c | 6 |
8 files changed, 21 insertions, 21 deletions
diff --git a/auto_tests/file_saving_test.c b/auto_tests/file_saving_test.c index 13a98280..f1d1c9e4 100644 --- a/auto_tests/file_saving_test.c +++ b/auto_tests/file_saving_test.c | |||
@@ -87,7 +87,7 @@ static void load_data_decrypted(void) | |||
87 | uint8_t *cipher = (uint8_t *)malloc(size); | 87 | uint8_t *cipher = (uint8_t *)malloc(size); |
88 | uint8_t *clear = (uint8_t *)malloc(size - TOX_PASS_ENCRYPTION_EXTRA_LENGTH); | 88 | uint8_t *clear = (uint8_t *)malloc(size - TOX_PASS_ENCRYPTION_EXTRA_LENGTH); |
89 | size_t read_value = fread(cipher, sizeof(*cipher), size, f); | 89 | size_t read_value = fread(cipher, sizeof(*cipher), size, f); |
90 | printf("Read read_vavue = %u of %ld\n", (unsigned)read_value, size); | 90 | printf("Read read_vavue = %u of %lu\n", (unsigned)read_value, (unsigned long)size); |
91 | 91 | ||
92 | TOX_ERR_DECRYPTION derr; | 92 | TOX_ERR_DECRYPTION derr; |
93 | 93 | ||
diff --git a/auto_tests/friend_request_test.c b/auto_tests/friend_request_test.c index 73f9248c..528a3b4f 100644 --- a/auto_tests/friend_request_test.c +++ b/auto_tests/friend_request_test.c | |||
@@ -51,7 +51,7 @@ static void test_friend_request(void) | |||
51 | c_sleep(ITERATION_INTERVAL); | 51 | c_sleep(ITERATION_INTERVAL); |
52 | } | 52 | } |
53 | 53 | ||
54 | printf("Toxes are online, took %ld seconds.\n", time(nullptr) - cur_time); | 54 | printf("Toxes are online, took %lu seconds.\n", (unsigned long)(time(nullptr) - cur_time)); |
55 | const time_t con_time = time(nullptr); | 55 | const time_t con_time = time(nullptr); |
56 | 56 | ||
57 | printf("Tox1 adds tox2 as friend, tox2 accepts.\n"); | 57 | printf("Tox1 adds tox2 as friend, tox2 accepts.\n"); |
@@ -71,8 +71,8 @@ static void test_friend_request(void) | |||
71 | c_sleep(ITERATION_INTERVAL); | 71 | c_sleep(ITERATION_INTERVAL); |
72 | } | 72 | } |
73 | 73 | ||
74 | printf("Tox clients connected took %ld seconds.\n", time(nullptr) - con_time); | 74 | printf("Tox clients connected took %lu seconds.\n", (unsigned long)(time(nullptr) - con_time)); |
75 | printf("friend_request_test succeeded, took %ld seconds.\n", time(nullptr) - cur_time); | 75 | printf("friend_request_test succeeded, took %lu seconds.\n", (unsigned long)(time(nullptr) - cur_time)); |
76 | 76 | ||
77 | tox_kill(tox1); | 77 | tox_kill(tox1); |
78 | tox_kill(tox2); | 78 | tox_kill(tox2); |
diff --git a/auto_tests/save_load_test.c b/auto_tests/save_load_test.c index 7d5672c7..57b2bda5 100644 --- a/auto_tests/save_load_test.c +++ b/auto_tests/save_load_test.c | |||
@@ -71,7 +71,7 @@ static void test_few_clients(void) | |||
71 | if (tox_self_get_connection_status(tox1) && tox_self_get_connection_status(tox2) | 71 | if (tox_self_get_connection_status(tox1) && tox_self_get_connection_status(tox2) |
72 | && tox_self_get_connection_status(tox3)) { | 72 | && tox_self_get_connection_status(tox3)) { |
73 | if (off) { | 73 | if (off) { |
74 | printf("Toxes are online, took %ld seconds\n", time(nullptr) - cur_time); | 74 | printf("Toxes are online, took %lu seconds\n", (unsigned long)(time(nullptr) - cur_time)); |
75 | con_time = time(nullptr); | 75 | con_time = time(nullptr); |
76 | off = 0; | 76 | off = 0; |
77 | } | 77 | } |
@@ -86,7 +86,7 @@ static void test_few_clients(void) | |||
86 | } | 86 | } |
87 | 87 | ||
88 | ck_assert_msg(connected_t1, "Tox1 isn't connected. %u", connected_t1); | 88 | ck_assert_msg(connected_t1, "Tox1 isn't connected. %u", connected_t1); |
89 | printf("tox clients connected took %ld seconds\n", time(nullptr) - con_time); | 89 | printf("tox clients connected took %lu seconds\n", (unsigned long)(time(nullptr) - con_time)); |
90 | 90 | ||
91 | const size_t save_size1 = tox_get_savedata_size(tox2); | 91 | const size_t save_size1 = tox_get_savedata_size(tox2); |
92 | ck_assert_msg(save_size1 != 0, "save is invalid size %u", (unsigned)save_size1); | 92 | ck_assert_msg(save_size1 != 0, "save is invalid size %u", (unsigned)save_size1); |
@@ -111,7 +111,7 @@ static void test_few_clients(void) | |||
111 | if (tox_self_get_connection_status(tox1) && tox_self_get_connection_status(tox2) | 111 | if (tox_self_get_connection_status(tox1) && tox_self_get_connection_status(tox2) |
112 | && tox_self_get_connection_status(tox3)) { | 112 | && tox_self_get_connection_status(tox3)) { |
113 | if (off) { | 113 | if (off) { |
114 | printf("Toxes are online again after reloading, took %ld seconds\n", time(nullptr) - cur_time); | 114 | printf("Toxes are online again after reloading, took %lu seconds\n", (unsigned long)(time(nullptr) - cur_time)); |
115 | con_time = time(nullptr); | 115 | con_time = time(nullptr); |
116 | off = 0; | 116 | off = 0; |
117 | } | 117 | } |
@@ -125,9 +125,9 @@ static void test_few_clients(void) | |||
125 | c_sleep(ITERATION_INTERVAL); | 125 | c_sleep(ITERATION_INTERVAL); |
126 | } | 126 | } |
127 | 127 | ||
128 | printf("tox clients connected took %ld seconds\n", time(nullptr) - con_time); | 128 | printf("tox clients connected took %lu seconds\n", (unsigned long)(time(nullptr) - con_time)); |
129 | 129 | ||
130 | printf("test_few_clients succeeded, took %ld seconds\n", time(nullptr) - cur_time); | 130 | printf("test_few_clients succeeded, took %lu seconds\n", (unsigned long)(time(nullptr) - cur_time)); |
131 | 131 | ||
132 | tox_options_free(options); | 132 | tox_options_free(options); |
133 | tox_kill(tox1); | 133 | tox_kill(tox1); |
diff --git a/auto_tests/set_name_test.c b/auto_tests/set_name_test.c index 6f467bdb..f8f94047 100644 --- a/auto_tests/set_name_test.c +++ b/auto_tests/set_name_test.c | |||
@@ -56,7 +56,7 @@ static void test_set_name(void) | |||
56 | c_sleep(ITERATION_INTERVAL); | 56 | c_sleep(ITERATION_INTERVAL); |
57 | } | 57 | } |
58 | 58 | ||
59 | printf("toxes are online, took %ld seconds\n", time(nullptr) - cur_time); | 59 | printf("toxes are online, took %lu seconds\n", (unsigned long)(time(nullptr) - cur_time)); |
60 | const time_t con_time = time(nullptr); | 60 | const time_t con_time = time(nullptr); |
61 | 61 | ||
62 | while (tox_friend_get_connection_status(tox1, 0, nullptr) != TOX_CONNECTION_UDP || | 62 | while (tox_friend_get_connection_status(tox1, 0, nullptr) != TOX_CONNECTION_UDP || |
@@ -66,7 +66,7 @@ static void test_set_name(void) | |||
66 | c_sleep(ITERATION_INTERVAL); | 66 | c_sleep(ITERATION_INTERVAL); |
67 | } | 67 | } |
68 | 68 | ||
69 | printf("tox clients connected took %ld seconds\n", time(nullptr) - con_time); | 69 | printf("tox clients connected took %lu seconds\n", (unsigned long)(time(nullptr) - con_time)); |
70 | 70 | ||
71 | tox_callback_friend_name(tox2, nickchange_callback); | 71 | tox_callback_friend_name(tox2, nickchange_callback); |
72 | TOX_ERR_SET_INFO err_n; | 72 | TOX_ERR_SET_INFO err_n; |
@@ -86,7 +86,7 @@ static void test_set_name(void) | |||
86 | tox_friend_get_name(tox2, 0, temp_name, nullptr); | 86 | tox_friend_get_name(tox2, 0, temp_name, nullptr); |
87 | ck_assert_msg(memcmp(temp_name, NICKNAME, sizeof(NICKNAME)) == 0, "Name not correct"); | 87 | ck_assert_msg(memcmp(temp_name, NICKNAME, sizeof(NICKNAME)) == 0, "Name not correct"); |
88 | 88 | ||
89 | printf("test_set_name succeeded, took %ld seconds\n", time(nullptr) - cur_time); | 89 | printf("test_set_name succeeded, took %lu seconds\n", (unsigned long)(time(nullptr) - cur_time)); |
90 | 90 | ||
91 | tox_kill(tox1); | 91 | tox_kill(tox1); |
92 | tox_kill(tox2); | 92 | tox_kill(tox2); |
diff --git a/auto_tests/set_status_message_test.c b/auto_tests/set_status_message_test.c index 3ffdd3c4..b6f01c09 100644 --- a/auto_tests/set_status_message_test.c +++ b/auto_tests/set_status_message_test.c | |||
@@ -59,7 +59,7 @@ static void test_set_status_message(void) | |||
59 | c_sleep(ITERATION_INTERVAL); | 59 | c_sleep(ITERATION_INTERVAL); |
60 | } | 60 | } |
61 | 61 | ||
62 | printf("toxes are online, took %ld seconds\n", time(nullptr) - cur_time); | 62 | printf("toxes are online, took %lu seconds\n", (unsigned long)(time(nullptr) - cur_time)); |
63 | const time_t con_time = time(nullptr); | 63 | const time_t con_time = time(nullptr); |
64 | 64 | ||
65 | while (tox_friend_get_connection_status(tox1, 0, nullptr) != TOX_CONNECTION_UDP || | 65 | while (tox_friend_get_connection_status(tox1, 0, nullptr) != TOX_CONNECTION_UDP || |
@@ -70,7 +70,7 @@ static void test_set_status_message(void) | |||
70 | c_sleep(ITERATION_INTERVAL); | 70 | c_sleep(ITERATION_INTERVAL); |
71 | } | 71 | } |
72 | 72 | ||
73 | printf("tox clients connected took %ld seconds\n", time(nullptr) - con_time); | 73 | printf("tox clients connected took %lu seconds\n", (unsigned long)(time(nullptr) - con_time)); |
74 | 74 | ||
75 | TOX_ERR_SET_INFO err_n; | 75 | TOX_ERR_SET_INFO err_n; |
76 | tox_callback_friend_status_message(tox2, status_callback); | 76 | tox_callback_friend_status_message(tox2, status_callback); |
@@ -93,7 +93,7 @@ static void test_set_status_message(void) | |||
93 | ck_assert_msg(memcmp(cmp_status, STATUS_MESSAGE, sizeof(STATUS_MESSAGE)) == 0, | 93 | ck_assert_msg(memcmp(cmp_status, STATUS_MESSAGE, sizeof(STATUS_MESSAGE)) == 0, |
94 | "status message not correct"); | 94 | "status message not correct"); |
95 | 95 | ||
96 | printf("test_set_status_message succeeded, took %ld seconds\n", time(nullptr) - cur_time); | 96 | printf("test_set_status_message succeeded, took %lu seconds\n", (unsigned long)(time(nullptr) - cur_time)); |
97 | 97 | ||
98 | tox_kill(tox1); | 98 | tox_kill(tox1); |
99 | tox_kill(tox2); | 99 | tox_kill(tox2); |
diff --git a/auto_tests/tox_many_test.c b/auto_tests/tox_many_test.c index 49933234..62c7c621 100644 --- a/auto_tests/tox_many_test.c +++ b/auto_tests/tox_many_test.c | |||
@@ -123,7 +123,7 @@ loop_top: | |||
123 | tox_kill(toxes[i]); | 123 | tox_kill(toxes[i]); |
124 | } | 124 | } |
125 | 125 | ||
126 | printf("test_many_clients succeeded, took %ld seconds\n", time(nullptr) - cur_time); | 126 | printf("test_many_clients succeeded, took %lu seconds\n", (unsigned long)(time(nullptr) - cur_time)); |
127 | } | 127 | } |
128 | 128 | ||
129 | int main(void) | 129 | int main(void) |
diff --git a/auto_tests/toxav_many_test.c b/auto_tests/toxav_many_test.c index ed005e2f..a8ed1c80 100644 --- a/auto_tests/toxav_many_test.c +++ b/auto_tests/toxav_many_test.c | |||
@@ -240,7 +240,7 @@ static void test_av_three_calls(void) | |||
240 | tox_self_get_connection_status(Bobs[0]) && | 240 | tox_self_get_connection_status(Bobs[0]) && |
241 | tox_self_get_connection_status(Bobs[1]) && | 241 | tox_self_get_connection_status(Bobs[1]) && |
242 | tox_self_get_connection_status(Bobs[2]) && off) { | 242 | tox_self_get_connection_status(Bobs[2]) && off) { |
243 | printf("Toxes are online, took %ld seconds\n", time(nullptr) - cur_time); | 243 | printf("Toxes are online, took %lu seconds\n", (unsigned long)(time(nullptr) - cur_time)); |
244 | off = 0; | 244 | off = 0; |
245 | } | 245 | } |
246 | 246 | ||
@@ -262,7 +262,7 @@ static void test_av_three_calls(void) | |||
262 | BobsAV[2] = setup_av_instance(Bobs[2], BobsCC + 2); | 262 | BobsAV[2] = setup_av_instance(Bobs[2], BobsCC + 2); |
263 | 263 | ||
264 | printf("Created 4 instances of ToxAV\n"); | 264 | printf("Created 4 instances of ToxAV\n"); |
265 | printf("All set after %ld seconds!\n", time(nullptr) - cur_time); | 265 | printf("All set after %lu seconds!\n", (unsigned long)(time(nullptr) - cur_time)); |
266 | 266 | ||
267 | thread_data tds[3]; | 267 | thread_data tds[3]; |
268 | tds[0].AliceAV = AliceAV; | 268 | tds[0].AliceAV = AliceAV; |
diff --git a/auto_tests/typing_test.c b/auto_tests/typing_test.c index 041e0b25..3b41dd40 100644 --- a/auto_tests/typing_test.c +++ b/auto_tests/typing_test.c | |||
@@ -53,7 +53,7 @@ static void test_typing(void) | |||
53 | c_sleep(200); | 53 | c_sleep(200); |
54 | } | 54 | } |
55 | 55 | ||
56 | printf("toxes are online, took %ld seconds\n", time(nullptr) - cur_time); | 56 | printf("toxes are online, took %lu seconds\n", (unsigned long)(time(nullptr) - cur_time)); |
57 | const time_t con_time = time(nullptr); | 57 | const time_t con_time = time(nullptr); |
58 | 58 | ||
59 | while (tox_friend_get_connection_status(tox1, 0, nullptr) != TOX_CONNECTION_UDP || | 59 | while (tox_friend_get_connection_status(tox1, 0, nullptr) != TOX_CONNECTION_UDP || |
@@ -64,7 +64,7 @@ static void test_typing(void) | |||
64 | c_sleep(200); | 64 | c_sleep(200); |
65 | } | 65 | } |
66 | 66 | ||
67 | printf("tox clients connected took %ld seconds\n", time(nullptr) - con_time); | 67 | printf("tox clients connected took %lu seconds\n", (unsigned long)(time(nullptr) - con_time)); |
68 | 68 | ||
69 | tox_callback_friend_typing(tox2, &typing_callback); | 69 | tox_callback_friend_typing(tox2, &typing_callback); |
70 | tox_self_set_typing(tox1, 0, true, nullptr); | 70 | tox_self_set_typing(tox1, 0, true, nullptr); |
@@ -90,7 +90,7 @@ static void test_typing(void) | |||
90 | ck_assert_msg(tox_friend_get_typing(tox2, 0, &err_t) == 0, "Typing failure"); | 90 | ck_assert_msg(tox_friend_get_typing(tox2, 0, &err_t) == 0, "Typing failure"); |
91 | ck_assert_msg(err_t == TOX_ERR_FRIEND_QUERY_OK, "Typing failure"); | 91 | ck_assert_msg(err_t == TOX_ERR_FRIEND_QUERY_OK, "Typing failure"); |
92 | 92 | ||
93 | printf("test_typing succeeded, took %ld seconds\n", time(nullptr) - cur_time); | 93 | printf("test_typing succeeded, took %lu seconds\n", (unsigned long)(time(nullptr) - cur_time)); |
94 | 94 | ||
95 | tox_kill(tox1); | 95 | tox_kill(tox1); |
96 | tox_kill(tox2); | 96 | tox_kill(tox2); |