diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ee15b9565..db202c45b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -453,13 +453,19 @@ function(auto_test target) endfunction() if(BUILD_TOXAV) - add_c_executable(auto_monolith_test auto_tests/monolith_test.c) + add_c_executable(auto_monolith_test + auto_tests/monolith_test.c + ${ANDROID_CPU_FEATURES}) target_link_modules(auto_monolith_test ${LIBSODIUM_LIBRARIES} ${OPUS_LIBRARIES} ${VPX_LIBRARIES} ${toxcore_PKGCONFIG_LIBS}) add_test(NAME monolith COMMAND auto_monolith_test) + + if(ANDROID_CPU_FEATURES) + target_compile_definitions(auto_monolith_test PRIVATE -Dtypeof=__typeof__) + endif() endif() auto_test(TCP) diff --git a/toxcore/group.c b/toxcore/group.c index d3f068dfce..9ade21a965 100644 --- a/toxcore/group.c +++ b/toxcore/group.c @@ -1832,8 +1832,8 @@ static unsigned int send_lossy_all_close(const Group_Chats *g_c, int groupnumber uint64_t comp_val_old = ~0; for (i = 0; i < num_connected_closest; ++i) { - uint8_t real_pk[CRYPTO_PUBLIC_KEY_SIZE]; - uint8_t dht_temp_pk[CRYPTO_PUBLIC_KEY_SIZE]; + uint8_t real_pk[CRYPTO_PUBLIC_KEY_SIZE] = {0}; + uint8_t dht_temp_pk[CRYPTO_PUBLIC_KEY_SIZE] = {0}; get_friendcon_public_keys(real_pk, dht_temp_pk, g_c->fr_c, g->close[connected_closest[i]].number); uint64_t comp_val = calculate_comp_value(g->real_pk, real_pk); @@ -1852,8 +1852,8 @@ static unsigned int send_lossy_all_close(const Group_Chats *g_c, int groupnumber comp_val_old = ~0; for (i = 0; i < num_connected_closest; ++i) { - uint8_t real_pk[CRYPTO_PUBLIC_KEY_SIZE]; - uint8_t dht_temp_pk[CRYPTO_PUBLIC_KEY_SIZE]; + uint8_t real_pk[CRYPTO_PUBLIC_KEY_SIZE] = {0}; + uint8_t dht_temp_pk[CRYPTO_PUBLIC_KEY_SIZE] = {0}; get_friendcon_public_keys(real_pk, dht_temp_pk, g_c->fr_c, g->close[connected_closest[i]].number); uint64_t comp_val = calculate_comp_value(real_pk, g->real_pk);