Skip to content

Commit ae4c208

Browse files
authored
Fix missing return warning for Fulminate equality (#251)
1 parent c50aeb9 commit ae4c208

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

lib/fulminate/cn_to_ail.ml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2158,7 +2158,22 @@ let generate_datatype_equality_function (filename : string) (cn_datatype : _ cn_
21582158
0,
21592159
empty_attributes,
21602160
param_syms,
2161-
mk_stmt A.(AilSblock ([], [ mk_stmt tag_if_stmt ])) ) )
2161+
mk_stmt
2162+
A.(
2163+
AilSblock
2164+
( [],
2165+
[ mk_stmt tag_if_stmt;
2166+
mk_stmt
2167+
(AilSreturn
2168+
(mk_expr (* AilEconst ConstantNull *)
2169+
(AilEcast
2170+
( C.no_qualifiers,
2171+
C.mk_ctype_pointer C.no_qualifiers C.void,
2172+
mk_expr
2173+
(AilEconst
2174+
(ConstantInteger (IConstant (Z.zero, Decimal, None))))
2175+
))))
2176+
] )) ) )
21622177
in
21632178
[ (decl, def) ]
21642179

0 commit comments

Comments
 (0)