diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-08-17 17:36:05 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-08-17 22:12:39 +0100 |
commit | db22522741cccdeba657776844538c71cf8e8e7a (patch) | |
tree | 581a9da7867c6887577a1e6800a07009a6a92581 /toxcore/util.c | |
parent | 2fc54498709f7721fc749383389f3d274e26058a (diff) |
Add missing DHT_bootstrap to CMakeLists.txt.
- This PR also adds a DEBUG cmake option that enables -DTOX_DEBUG.
- We also remove `-Wall`, because there are too many warnings, and nobody really
looks at them at the moment. We'll see about fixing them soon. We'll also want
to enable `-Werror` at some point.
- Finally, this PR enables `-O3` to make sure toxcore still works correctly
under heavy compiler optimisations.
Diffstat (limited to 'toxcore/util.c')
-rw-r--r-- | toxcore/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toxcore/util.c b/toxcore/util.c index ea1988e4..b120957c 100644 --- a/toxcore/util.c +++ b/toxcore/util.c | |||
@@ -118,7 +118,7 @@ int load_state(load_state_callback_func load_state_callback, void *outer, | |||
118 | const uint8_t *data, uint32_t length, uint16_t cookie_inner) | 118 | const uint8_t *data, uint32_t length, uint16_t cookie_inner) |
119 | { | 119 | { |
120 | if (!load_state_callback || !data) { | 120 | if (!load_state_callback || !data) { |
121 | #ifdef DEBUG | 121 | #ifdef TOX_DEBUG |
122 | fprintf(stderr, "load_state() called with invalid args.\n"); | 122 | fprintf(stderr, "load_state() called with invalid args.\n"); |
123 | #endif | 123 | #endif |
124 | return -1; | 124 | return -1; |
@@ -137,7 +137,7 @@ int load_state(load_state_callback_func load_state_callback, void *outer, | |||
137 | 137 | ||
138 | if (length < length_sub) { | 138 | if (length < length_sub) { |
139 | /* file truncated */ | 139 | /* file truncated */ |
140 | #ifdef DEBUG | 140 | #ifdef TOX_DEBUG |
141 | fprintf(stderr, "state file too short: %u < %u\n", length, length_sub); | 141 | fprintf(stderr, "state file too short: %u < %u\n", length, length_sub); |
142 | #endif | 142 | #endif |
143 | return -1; | 143 | return -1; |
@@ -145,7 +145,7 @@ int load_state(load_state_callback_func load_state_callback, void *outer, | |||
145 | 145 | ||
146 | if (lendian_to_host16((cookie_type >> 16)) != cookie_inner) { | 146 | if (lendian_to_host16((cookie_type >> 16)) != cookie_inner) { |
147 | /* something is not matching up in a bad way, give up */ | 147 | /* something is not matching up in a bad way, give up */ |
148 | #ifdef DEBUG | 148 | #ifdef TOX_DEBUG |
149 | fprintf(stderr, "state file garbeled: %04hx != %04hx\n", (cookie_type >> 16), cookie_inner); | 149 | fprintf(stderr, "state file garbeled: %04hx != %04hx\n", (cookie_type >> 16), cookie_inner); |
150 | #endif | 150 | #endif |
151 | return -1; | 151 | return -1; |