fix compile warnings in ed25519 code

This commit is contained in:
Arvid Norberg 2013-10-14 01:04:02 +00:00
parent afd80cffb7
commit d4032c6101
2 changed files with 6 additions and 4 deletions

View File

@ -268,8 +268,8 @@ int sha512(const unsigned char *message, size_t message_len, unsigned char *out)
{
sha512_context ctx;
int ret;
if (ret = sha512_init(&ctx)) return ret;
if (ret = sha512_update(&ctx, message, message_len)) return ret;
if (ret = sha512_final(&ctx, out)) return ret;
if ((ret = sha512_init(&ctx))) return ret;
if ((ret = sha512_update(&ctx, message, message_len))) return ret;
if ((ret = sha512_final(&ctx, out))) return ret;
return 0;
}
}

View File

@ -160,12 +160,14 @@ int main()
fflush(stderr);
int ret = print_failures();
#if !defined TORRENT_LOGGING && !defined TORRENT_VERBOSE_LOGGING
if (ret == 0)
{
remove_all(test_dir, ec);
if (ec)
fprintf(stderr, "failed to remove test dir: %s\n", ec.message().c_str());
}
#endif
return ret;
}