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:
George Burgess IV 2019-06-13 15:13:02 -07:00
parent 9894ec4596
commit 06bb4ce8de

View file

@ -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>();