Move gcm_test to C++
Since gcm_test now contains variable decls in for loops it needs -std=c11. However, tests are compiled with C++ test_support files in Bazel, which doesn't work with -std=c11. Change-Id: Ife18c2d80b01448bb3b7ee2728412289bf749bd9 Reviewed-on: https://boringssl-review.googlesource.com/11041 Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
parent
32d961ae48
commit
75e44ae21d
@ -57,7 +57,7 @@ perlasm(ghashv8-armx.${ASM_EXT} asm/ghashv8-armx.pl)
|
||||
add_executable(
|
||||
gcm_test
|
||||
|
||||
gcm_test.c
|
||||
gcm_test.cc
|
||||
|
||||
$<TARGET_OBJECTS:test_support>
|
||||
)
|
||||
|
@ -269,7 +269,7 @@ static int decode_hex(uint8_t **out, size_t *out_len, const char *in,
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t *buf = OPENSSL_malloc(len / 2);
|
||||
uint8_t *buf = reinterpret_cast<uint8_t *>(OPENSSL_malloc(len / 2));
|
||||
if (buf == NULL) {
|
||||
fprintf(stderr, "%u: malloc failure.\n", test_num);
|
||||
goto err;
|
||||
@ -332,7 +332,7 @@ static int run_test_case(unsigned test_num, const struct test_case *test) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
out = OPENSSL_malloc(plaintext_len);
|
||||
out = reinterpret_cast<uint8_t *>(OPENSSL_malloc(plaintext_len));
|
||||
if (plaintext_len != 0 && out == NULL) {
|
||||
goto out;
|
||||
}
|
Loading…
Reference in New Issue
Block a user