-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix warnings in BinarySerializer #963
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -34,7 +43,7 @@ class BinarySerializer { | |||
} | |||
|
|||
static size_t serializeBuffer( | |||
const char* buffer, | |||
char* buffer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious why remove const here? Are we modifying the buffer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the function serializes kcos into buffer. It should never have been const.
2dedd07
to
e5f0948
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
This PR adjusts BinarySerializer in these ways:
A short discussion on this was held here previously: #921 (comment)
On x86/ARM, unaligned reads/writes are acceptable with general purpose registers, but they may crash on x86 if the optimizer decides to use a SIMD register.