Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/facebook/luaffifb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames R. McKaskill <james@foobar.co.nz>2012-04-12 03:13:37 +0400
committerJames R. McKaskill <james@foobar.co.nz>2012-04-22 07:10:48 +0400
commitb23a23357c101355a958ca8ad52068746a54d2ac (patch)
tree89a3474aa4120be332cafdd73c9305ec5dbb77a9 /parser.c
parent8042d117bbbd5208ed59fee6591abe267ac4ecbf (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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/parser.c b/parser.c
index 04fc65d..5113e63 100644
--- a/parser.c
+++ b/parser.c
@@ -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;