fortify: fix tests on x86_64
My declval hack failed on x86_64 with: ``` substitution failure [with T = __va_list_tag [1]]: function cannot return array type '__va_list_tag [1]' ``` ...Because the type of va_list is compiler magic, it's fine for it to be whatever the compiler wants it to be. Thankfully, pointers to arrays can be returned, so let's use those instead. Bug: 135210098 Test: mma on aosp_blueline-eng and aosp_x86_64-eng; the latter was failing before this patch. Change-Id: Iefd57c0f8e823653fd70633fb6ee75cfc0022430
This commit is contained in:
parent
9894ec4596
commit
06bb4ce8de
1 changed files with 1 additions and 1 deletions
|
@ -307,7 +307,7 @@ static void testFcntl() {
|
|||
static void testFormatStrings() {
|
||||
const auto unsigned_value = declval<unsigned long long>();
|
||||
const auto* unknown_string = declval<const char*>();
|
||||
const auto va = declval<va_list>();
|
||||
const auto va = *declval<va_list*>();
|
||||
|
||||
{
|
||||
auto some_fd = declval<int>();
|
||||
|
|
Loading…
Reference in a new issue