From ea13edcae00cc4ab1805e85322e73b7aa2faba7a Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Mon, 22 Apr 2019 10:12:42 -0400 Subject: don't use variable length or zero-length arrays in test files as some compilers don't handle that --- tests/test_olm_sha256.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/test_olm_sha256.cpp') diff --git a/tests/test_olm_sha256.cpp b/tests/test_olm_sha256.cpp index c6d0242..d76e592 100644 --- a/tests/test_olm_sha256.cpp +++ b/tests/test_olm_sha256.cpp @@ -1,13 +1,15 @@ #include "olm/olm.h" #include "unittest.hh" +#include + int main() { { TestCase("Olm sha256 test"); -std::uint8_t utility_buffer[::olm_utility_size()]; -::OlmUtility * utility = ::olm_utility(utility_buffer); +std::vector utility_buffer(::olm_utility_size()); +::OlmUtility * utility = ::olm_utility(utility_buffer.data()); assert_equals(std::size_t(43), ::olm_sha256_length(utility)); std::uint8_t output[43]; -- cgit v1.2.3