Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a6bf4746
Commit
a6bf4746
authored
Apr 30, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test/test_byte_reverse: use gcc_alignas() for gcc<4.8 compatibility
parent
72637d00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
test_byte_reverse.cxx
test/test_byte_reverse.cxx
+4
-4
No files found.
test/test_byte_reverse.cxx
View file @
a6bf4746
...
...
@@ -49,9 +49,9 @@ CPPUNIT_TEST_SUITE_REGISTRATION(ByteReverseTest);
void
ByteReverseTest
::
TestByteReverse2
()
{
static
const
char
src
[]
alignas
(
uint16_t
)
=
"123456"
;
static
const
char
src
[]
gcc_alignas
(
uint16_t
,
2
)
=
"123456"
;
static
const
char
result
[]
=
"214365"
;
static
uint8_t
dest
[
ARRAY_SIZE
(
src
)]
alignas
(
uint16_t
);
static
uint8_t
dest
[
ARRAY_SIZE
(
src
)]
gcc_alignas
(
uint16_t
,
2
);
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"
;
static
const
char
src
[]
gcc_alignas
(
uint32_t
,
4
)
=
"12345678"
;
static
const
char
result
[]
=
"43218765"
;
static
uint8_t
dest
[
ARRAY_SIZE
(
src
)]
alignas
(
uint32_t
);
static
uint8_t
dest
[
ARRAY_SIZE
(
src
)]
gcc_alignas
(
uint32_t
,
4
);
reverse_bytes
(
dest
,
(
const
uint8_t
*
)
src
,
(
const
uint8_t
*
)(
src
+
ARRAY_SIZE
(
src
)
-
1
),
4
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment