update toxcore, toxav fixes merged
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run

Merge commit 'cae0ab9c5c75eda665d21dc36cfeef48c1e04b53'
This commit is contained in:
Green Sky
2024-11-09 13:44:30 +01:00
96 changed files with 1320 additions and 1159 deletions

View File

@ -137,7 +137,7 @@ int main(int argc, char *argv[])
printf("Failed to set status. Error number: %d\n", err);
}
for (unsigned int i = 2; i < argc; i++) { //start at 2 because that is where the tox ids are
for (int i = 2; i < argc; i++) { //start at 2 because that is where the tox ids are
uint8_t *address = hex_string_to_bin(argv[i]);
Tox_Err_Friend_Add friend_err;
tox_friend_add(tox, address, (const uint8_t *)GENERATED_REQUEST_MESSAGE, strlen(GENERATED_REQUEST_MESSAGE),
@ -145,7 +145,7 @@ int main(int argc, char *argv[])
free(address);
if (friend_err != TOX_ERR_FRIEND_ADD_OK) {
printf("Failed to add friend number %u. Error number: %d\n", i - 1, friend_err);
printf("Failed to add friend number %d. Error number: %d\n", i - 1, friend_err);
}
}

View File

@ -35,7 +35,7 @@ static int load_file(const char *filename, unsigned char **result)
fseek(f, 0, SEEK_SET);
*result = (unsigned char *)malloc(size + 1);
if (size != fread(*result, sizeof(char), size, f)) {
if ((size_t)size != fread(*result, sizeof(char), size, f)) {
free(*result);
fclose(f);
return -2; // -2 means file reading fail
@ -55,13 +55,13 @@ int main(int argc, char *argv[])
crypto_sign_ed25519_keypair(pk, sk);
printf("Public key:\n");
for (int i = 0; i < crypto_sign_ed25519_PUBLICKEYBYTES; ++i) {
for (uint32_t i = 0; i < crypto_sign_ed25519_PUBLICKEYBYTES; ++i) {
printf("%02X", pk[i]);
}
printf("\nSecret key:\n");
for (int i = 0; i < crypto_sign_ed25519_SECRETKEYBYTES; ++i) {
for (uint32_t i = 0; i < crypto_sign_ed25519_SECRETKEYBYTES; ++i) {
printf("%02X", sk[i]);
}

View File

@ -117,7 +117,7 @@ int main(int argc, char *argv[])
#endif
crypto_box_keypair(public_key, secret_key);
for (int i = 0; i <= crypto_box_PUBLICKEYBYTES - len; ++i) {
for (uint32_t i = 0; i <= crypto_box_PUBLICKEYBYTES - len; ++i) {
if (memcmp(public_key + i, desired_bin, len) == 0) {
found = 1;
break;