From 0096d6972fd7fec566024aff691c14d82d20ea80 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 27 Mar 2018 17:05:35 +0200 Subject: Fix mistake in Bitfield transformation (#66) Unions containing multiple bit fields were transformed incorrectly. --- cparser/Bitfields.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cparser') diff --git a/cparser/Bitfields.ml b/cparser/Bitfields.ml index e0dccbd2..baf2b0ec 100644 --- a/cparser/Bitfields.ml +++ b/cparser/Bitfields.ml @@ -144,7 +144,7 @@ let rec transf_struct_members env id count = function end let rec transf_union_members env id count = function - [] -> [] + | [] -> [] | m :: ms -> (match m.fld_bitfield with | None -> m::transf_union_members env id count ms @@ -176,7 +176,7 @@ let rec transf_union_members env id count = function bf_signed = signed; bf_signed_res = signed2; bf_bool = is_bool}; { fld_name = carrier; fld_typ = carrier_typ; fld_bitfield = None; fld_anonymous = false;} - :: transf_struct_members env id (count + 1) ms) + :: transf_union_members env id (count + 1) ms) let transf_composite env su id attr ml = match su with -- cgit