Skip to content
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 Xcode warning of mis-aligned structs #12772

Merged
merged 1 commit into from Oct 5, 2017

Conversation

muxi
Copy link
Member

@muxi muxi commented Sep 30, 2017

The Xcode warning of struct misalignment is due to nanopb packing structs across byte alignment boundaries. It appears there is no Apple LLVM compiler option provided to supress this problem. On the other hand, nanopb supports disabling struct packing for compatibility on some platforms.

In this PR, we disable struct packing to eliminates the corresponding warning. The cost of the change, according to nanopb manual, should be minor RAM increase.

#12194

@muxi
Copy link
Member Author

muxi commented Oct 5, 2017

Confirmed by author of nanopb that wire format is not affected.

@muxi
Copy link
Member Author

muxi commented Oct 5, 2017

Test failures:
Interop Cloud-to-Prod Tests (internal CI) - should not affect java

@muxi muxi merged commit a83cd1c into grpc:master Oct 5, 2017
@muxi muxi deleted the fix-xcode-misalign-warning branch October 5, 2017 18:20
muxi added a commit that referenced this pull request Oct 5, 2017
Backport #12772: Fix Xcode warning of mis-aligned structs
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
@lock lock bot unassigned makdharma Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants