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

Suppress unused-but-set-variable warnings #58

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

nobu
Copy link
Member

@nobu nobu commented Jul 31, 2023

Some compilers warn yynerrs in the tests.

/tmp/test.c:1268:9: warning: variable 'yynerrs' set but not used
      [-Wunused-but-set-variable]
    int yynerrs = 0;
        ^
1 warning generated.
/tmp/test.c:1258:9: warning: variable 'yynerrs' set but not used
      [-Wunused-but-set-variable]
    int yynerrs = 0;
        ^
1 warning generated.

@yui-knk
Copy link
Collaborator

yui-knk commented Jul 31, 2023

I'm happy to merge this PR, could you share me the compilers warns these codes? I will consider to add the environment to CI if it's not difficult.

@nobu
Copy link
Member Author

nobu commented Jul 31, 2023

$ clang --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: x86_64-apple-darwin22.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

@yui-knk yui-knk merged commit c708a60 into ruby:master Aug 3, 2023
9 checks passed
@nobu nobu deleted the compiler-warnings branch December 4, 2023 08:42
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.

2 participants