forked from dbus-asio/dbus-asio
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Avoid type punning doubles to uint64_t
When GCC is run with -fstrict-aliasing it complains about type punning from a double to a uint64_t. The recommended way to avoid this problem is to use memcpy. The compiler ought to be clever enough to realise that it doesn't actually need to do any copying. (This is a deliberately different choice to the implementation in MessageIStream::read in the hope that it means that we're testing the implementation correctly.)
- Loading branch information
Showing
3 changed files
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters