NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Warning (level 4) C4121

'symbol' : alignment of a member was sensitive to packing

A structure member is aligned on a memory offset whose value is not a multiple of the member’s size. For example, the following code snippet will produce this warning:

// compile with cl /W4 /c
#pragma pack(2)
struct foo { char a; int b; };

You could make one of the following changes to prevent this warning:

When data is not aligned on boundaries that are multiples of the data’s size performance can degrade and if you port your code to a RISC machine it will not compile.

You can specify the structure alignment with #pragma pack or /Zp.