diff options
author | James R. McKaskill <james@foobar.co.nz> | 2012-04-12 03:13:37 +0400 |
---|---|---|
committer | James R. McKaskill <james@foobar.co.nz> | 2012-04-22 07:10:48 +0400 |
commit | b23a23357c101355a958ca8ad52068746a54d2ac (patch) | |
tree | 89a3474aa4120be332cafdd73c9305ec5dbb77a9 /parser.c | |
parent | 8042d117bbbd5208ed59fee6591abe267ac4ecbf (diff) |
Overallocate bitfield structs to the next 8 byte boundary to stop valgrind.
Valgrind is rightly complaining as we always access bitfields in 8 byte chunks
to simplify the get/set logic.
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -447,6 +447,10 @@ static int calculate_member_position(lua_State* L, struct parser* P, struct ctyp ct->align_mask = P->align_mask; } + if (mt->has_bitfield || mt->is_bitfield) { + ct->has_bitfield = 1; + } + *pbits_left = bits_left; *pbit_offset = bit_offset; return 0; |