Skip to content
This repository was archived by the owner on Apr 12, 2025. It is now read-only.

Remove the use of mem::zeroed() from generated code #35

Merged
merged 1 commit into from
May 12, 2022

Conversation

JohnTitor
Copy link
Owner

@JohnTitor JohnTitor commented May 10, 2022

Fixes #31

@JohnTitor JohnTitor force-pushed the fix-offset-of-again branch from 13ba566 to a16f446 Compare May 10, 2022 12:10
@JohnTitor
Copy link
Owner Author

@joshtriplett Do you have any chance to use this patch before merging?

@joshtriplett
Copy link
Contributor

@JohnTitor That partially fixes the issue, but the other uses of zeroed in the generated code also need updating.

@JohnTitor JohnTitor changed the title Tweak offset_of macro on generated code Remove the use of mem::zeroed() from generated code May 11, 2022
@JohnTitor JohnTitor force-pushed the fix-offset-of-again branch from 9b669fb to e8b215c Compare May 11, 2022 04:39
@JohnTitor
Copy link
Owner Author

Good call, I totally overlooked them.
Now there's no use of mem::zeroed(), could you re-check?

@joshtriplett
Copy link
Contributor

joshtriplett commented May 12, 2022

@JohnTitor That fixed the problem, thank you! I can run the libz-sys systest suite with ctest2 from this PR branch.

@JohnTitor JohnTitor merged commit 6d2dd7d into master May 12, 2022
@JohnTitor JohnTitor deleted the fix-offset-of-again branch May 12, 2022 09:15
tgross35 pushed a commit to tgross35/ctest2 that referenced this pull request Apr 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

offset_of assumes structure can be zero-initialized
2 participants