Skip to content

Commit

Permalink
Cast result of _lf_allocate to placate CCpp target.
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardalee authored and cmnrd committed Jul 26, 2022
1 parent ca15cc5 commit 8b35b59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion org.lflang/src/org/lflang/generator/c/CPortGenerator.java
Expand Up @@ -111,7 +111,7 @@ public static String initializeInputMultiport(
if (AttributeUtils.isSparse(input.getDefinition())) {
return String.join("\n", result,
"if ("+input.getWidth()+" >= LF_SPARSE_WIDTH_THRESHOLD) {",
" "+portRefName+"__sparse = _lf_allocate(1,",
" "+portRefName+"__sparse = (lf_sparse_io_record_t*)_lf_allocate(1,",
" sizeof(lf_sparse_io_record_t) + sizeof(size_t) * "+input.getWidth()+"/LF_SPARSE_CAPACITY_DIVIDER,",
" &"+reactorSelfStruct+"->base.allocations);",
" "+portRefName+"__sparse->capacity = "+input.getWidth()+"/LF_SPARSE_CAPACITY_DIVIDER;",
Expand Down

0 comments on commit 8b35b59

Please sign in to comment.