diff options
author | Max Kellermann <max@musicpd.org> | 2017-05-19 19:45:38 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-05-19 19:45:42 +0200 |
commit | ca23b15f5cd1f4eed0ec2482e3e6e3d225bd6832 (patch) | |
tree | caabb63502e097c885ebb894f6d635de1568ce58 /test | |
parent | ffa676f577a202f3b78b69a52cf327fa095541be (diff) |
test/test_byte_reverse: move "alignas" attribute to the front
Apparently, this makes old clang versions happy ("'alignas' attribute
cannot be applied to types).
Diffstat (limited to 'test')
-rw-r--r-- | test/test_byte_reverse.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_byte_reverse.cxx b/test/test_byte_reverse.cxx index 3643e07af..f884e1fbe 100644 --- a/test/test_byte_reverse.cxx +++ b/test/test_byte_reverse.cxx @@ -49,9 +49,9 @@ CPPUNIT_TEST_SUITE_REGISTRATION(ByteReverseTest); void ByteReverseTest::TestByteReverse2() { - static const char src[] alignas(uint16_t) = "123456"; + alignas(uint16_t) static const char src[] = "123456"; static const char result[] = "214365"; - static uint8_t dest[ARRAY_SIZE(src)] alignas(uint16_t); + alignas(uint16_t)static uint8_t dest[ARRAY_SIZE(src)]; reverse_bytes(dest, (const uint8_t *)src, (const uint8_t *)(src + ARRAY_SIZE(src) - 1), 2); @@ -73,9 +73,9 @@ ByteReverseTest::TestByteReverse3() void ByteReverseTest::TestByteReverse4() { - static const char src[] alignas(uint32_t) = "12345678"; + alignas(uint32_t) static const char src[] = "12345678"; static const char result[] = "43218765"; - static uint8_t dest[ARRAY_SIZE(src)] alignas(uint32_t); + alignas(uint32_t) static uint8_t dest[ARRAY_SIZE(src)]; reverse_bytes(dest, (const uint8_t *)src, (const uint8_t *)(src + ARRAY_SIZE(src) - 1), 4); |