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

Fix Go output to handle unused variable idx for empty regexps #413

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

dgryski
Copy link
Contributor

@dgryski dgryski commented Apr 20, 2023

Unused variables are an error in Go. In the cases where libfsm constructs an empty machine consisting only of a { return ... } block, the idx variable will be unused. Assigning to _ is the standard solution to avoid this problem.

@katef katef merged commit 95a8c61 into katef:main Apr 21, 2023
@dgryski dgryski deleted the dgryski/go-unused-idx branch April 26, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants