summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-02-23 02:22:38 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-02-24 22:20:22 +0000
commitd3b286cb434ed228e7b62cc70cb293e7a5554bfa (patch)
tree9ab3dd66f9dba2ca861ba8c6e098fb96754aa80b /testing
parentafc80922e720f5d2a93bdfb3745da058e5ddf81b (diff)
Fix a bunch of compiler warnings and remove suppressions.
Diffstat (limited to 'testing')
-rw-r--r--testing/Messenger_test.c4
-rw-r--r--testing/misc_tools.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/testing/Messenger_test.c b/testing/Messenger_test.c
index 50e0fa57..daf2d125 100644
--- a/testing/Messenger_test.c
+++ b/testing/Messenger_test.c
@@ -190,6 +190,7 @@ int main(int argc, char *argv[])
190 FILE *file = fopen("Save.bak", "wb"); 190 FILE *file = fopen("Save.bak", "wb");
191 191
192 if (file == nullptr) { 192 if (file == nullptr) {
193 kill_messenger(m);
193 return 1; 194 return 1;
194 } 195 }
195 196
@@ -198,12 +199,11 @@ int main(int argc, char *argv[])
198 size_t write_result = fwrite(buffer, 1, messenger_size(m), file); 199 size_t write_result = fwrite(buffer, 1, messenger_size(m), file);
199 200
200 if (write_result < messenger_size(m)) { 201 if (write_result < messenger_size(m)) {
202 kill_messenger(m);
201 return 1; 203 return 1;
202 } 204 }
203 205
204 free(buffer); 206 free(buffer);
205 fclose(file); 207 fclose(file);
206 } 208 }
207
208 kill_messenger(m);
209} 209}
diff --git a/testing/misc_tools.c b/testing/misc_tools.c
index 14e0ba7e..3a6a3333 100644
--- a/testing/misc_tools.c
+++ b/testing/misc_tools.c
@@ -47,6 +47,10 @@
47 47
48#include "../toxcore/ccompat.h" 48#include "../toxcore/ccompat.h"
49 49
50uint8_t *hex_string_to_bin(const char *hex_string);
51int tox_strncasecmp(const char *s1, const char *s2, size_t n);
52int cmdline_parsefor_ipv46(int argc, char **argv, uint8_t *ipv6enabled);
53
50// You are responsible for freeing the return value! 54// You are responsible for freeing the return value!
51uint8_t *hex_string_to_bin(const char *hex_string) 55uint8_t *hex_string_to_bin(const char *hex_string)
52{ 56{