Skip to content

Conversation

JeevakaPrabu
Copy link
Contributor

When gmmlib is compiled with -Wpragma-pack-suspicious-include, following build issue is seen

Source/GmmLib/inc/External/Common/GmmResourceInfoExt.h:195:14:

error: non-default #pragma pack value changes the alignment of \ struct or union members in the included file
[-Werror,-Wpragma-pack-suspicious-include]
#include "External/Linux/GmmResourceInfoLinExt.h"

Source/GmmLib/inc/External/Common/GmmResourceInfo.h:91:14: \ error: non-default #pragma pack value changes the alignment of struct or \ union members in the included file [-Werror,-Wpragma-pack-suspicious-include]
#include "../Linux/GmmResourceInfoLin.h"

Source/GmmLib/inc/External/Common/GmmResourceInfo.h:30:9: note: previous \ '#pragma pack' directive that modifies alignment is here
#pragma pack(push, 8)

Move the header include outside the pragma definition and add the pragma packing as part of the headers.

When gmmlib is compiled with -Wpragma-pack-suspicious-include,
following build issue is seen

Source/GmmLib/inc/External/Common/GmmResourceInfoExt.h:195:14:

error: non-default #pragma pack value changes the alignment of \
struct or union members in the included file \
[-Werror,-Wpragma-pack-suspicious-include] \
    #include "External/Linux/GmmResourceInfoLinExt.h"

Source/GmmLib/inc/External/Common/GmmResourceInfo.h:91:14: \
error: non-default #pragma pack value changes the alignment of struct or \
union members in the included file [-Werror,-Wpragma-pack-suspicious-include]
    #include "../Linux/GmmResourceInfoLin.h"

Source/GmmLib/inc/External/Common/GmmResourceInfo.h:30:9: note: previous \
'#pragma pack' directive that modifies alignment is here
    #pragma pack(push, 8)

Move the header include outside the pragma definition and add the pragma
packing as part of the headers.

Signed-off-by: Jeevaka Prabu Badrappan <[email protected]>
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.

1 participant