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

libs/image: fix structure-packing pragma warning #5

Merged
merged 2 commits into from
Aug 4, 2018

Conversation

rjw57
Copy link
Contributor

@rjw57 rjw57 commented Aug 4, 2018

When compiling with clang on Linux, the following warning is generated:

../../libs/image/src/ImageDecoder.cpp:487:13: warning: unterminated '#pragma pack (push, ...)' at end of file [-Wpragma-pack]
    #pragma pack(push, 1)
            ^

According to [1], the correct pragma to pop the packing state from the internal stack is "#pragma pack(pop)" rather than "#pragma pop()" which is used currently. This PR replaces "#pragma pop()" with "#pragma pack(pop)".

[1] http://gcc.gnu.org/onlinedocs/gcc-4.2.3/gcc/Structure_002dPacking-Pragmas.html

When compiling with clang on Linux, the following warning is generated:

../../libs/image/src/ImageDecoder.cpp:487:13: warning: unterminated '#pragma pack (push, ...)' at end of file [-Wpragma-pack]
    #pragma pack(push, 1)
            ^

According to [1], the correct pragma to pop the packing state from the
internal stack is "#pragma pack(pop)" rather than "#pragma pop()" which
is used currently. This commit replaces "#pragma pop()" with "#pragma
pack(pop)".

[1] http://gcc.gnu.org/onlinedocs/gcc-4.2.3/gcc/Structure_002dPacking-Pragmas.html
@rjw57 rjw57 force-pushed the fix-pragma-pack-warning branch from 1faa705 to 69cec58 Compare August 4, 2018 07:18
Copy link
Collaborator

@romainguy romainguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@romainguy romainguy merged commit a9153d9 into google:master Aug 4, 2018
@geroge-d geroge-d mentioned this pull request Sep 3, 2019
@bigbigdaddy bigbigdaddy mentioned this pull request Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants