Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into icon-attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed Aug 23, 2022
2 parents aa99002 + 8ded940 commit c028a8c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/rs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,29 @@ jobs:
ref: ${{ inputs.compiler-ref }}
- name: Prepare build environment
uses: ./.github/actions/prepare-build-env
- name: Check out specific ref of reactor-rs
uses: actions/checkout@v3
with:
repository: lf-lang/reactor-rs
path: org.lflang/src/lib/rs/reactor-rs
ref: ${{ inputs.runtime-ref }}
if: ${{ inputs.runtime-ref }}
- name: Setup Rust
id: rustup
uses: ATiltedTree/setup-rust@v1
with:
rust-version: ${{ matrix.rust }}
components: clippy
continue-on-error: true
- name: Delete rustup cache
run: rm -r ~/.rustup
if: ${{ steps.rustup.outcome }} != "success"
- name: Setup Rust (again)
if: ${{ steps.rustup.outcome }} != "success"
uses: ATiltedTree/setup-rust@v1
with:
rust-version: ${{ matrix.rust }}
components: clippy
- name: Set rust runtime version
run: |
echo ${{ inputs.runtime-ref }} > org.lflang/src/org/lflang/generator/rust/rust-runtime-version.txt
if: ${{ inputs.runtime-ref }}
- name: Run Rust tests
run: |
./gradlew test --tests org.lflang.tests.runtime.RustTest.*
Expand Down
2 changes: 1 addition & 1 deletion org.lflang/src/lib/py/reactor-c-py
1 change: 1 addition & 0 deletions org.lflang/src/org/lflang/generator/c/CGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -2678,6 +2678,7 @@ private void generateSelfStructs(ReactorInstance r) {
// create references to the runtime instances aware of this exception.
// For now, we just create a larger array than needed.
initializeTriggerObjects.pr(CUtil.selfType(r)+"* "+CUtil.reactorRefName(r)+"["+r.getTotalWidth()+"];");
initializeTriggerObjects.pr("SUPPRESS_UNUSED_WARNING("+CUtil.reactorRefName(r)+");");
for (ReactorInstance child : r.children) {
generateSelfStructs(child);
}
Expand Down
4 changes: 2 additions & 2 deletions org.lflang/src/org/lflang/generator/c/CMainGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public String generateCode() {
*/
private String generateMainFunction() {
return String.join("\n",
"int main(int argc, char* argv[]) {",
"int main(int argc, const char* argv[]) {",
" return lf_reactor_c_main(argc, argv);",
"}"
);
Expand All @@ -53,7 +53,7 @@ private String generateSetDefaultCliOption() {
// so start with that.
return runCommand.size() > 0 ?
String.join("\n",
"char* _lf_default_argv[] = { " +
"const char* _lf_default_argv[] = { " +
StringUtil.addDoubleQuotes(
StringUtil.joinObjects(runCommand,
StringUtil.addDoubleQuotes(", ")))+" };",
Expand Down

0 comments on commit c028a8c

Please sign in to comment.