Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added return for non-void return function for arduino support #309

Conversation

chacalnoir
Copy link

lf_arduino_support.c has no return in the lf_sleep function with signature: int lf_sleep(interval_t sleep_duration)

If some warnings are treated as errors (which is done by default on a Windows 11 WSL Ubuntu 22.04 installation), the following error prevents compilation:

/xxx/src/core/platform/lf_arduino_support.c: In function 'lf_sleep':
/xxx/src/core/platform/lf_arduino_support.c:99:1: error: control reaches end of non-void function [-Werror=return-type]
   99 | }
      | ^
cc1: some warnings being treated as errors

This PR fixes that issue by adding a return 0, which resolves the compilation issue.

Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks for the fix 👍

@lhstrh lhstrh added the bugfix label Nov 25, 2023
@lhstrh lhstrh merged commit 16af56a into lf-lang:main Nov 25, 2023
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants