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

THRIFT-5738: Unused variable fails mac builds #2855

Merged
merged 1 commit into from
Sep 25, 2023
Merged

THRIFT-5738: Unused variable fails mac builds #2855

merged 1 commit into from
Sep 25, 2023

Conversation

jeffalder
Copy link
Contributor

@jeffalder jeffalder commented Sep 25, 2023

Building 0.19.0 on Mac OS Ventura 13.6 (Darwin J59JPHTWW7 22.6.0 Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:28 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T6000 arm64) yields this error:

src/thrift/generate/t_java_generator.cc:5759:9: error: variable 'j' set but not used [-Werror,-Wunused-but-set-variable]
    int j = 0;
        ^
1 error generated.
make[1]: *** [src/thrift/generate/thrift-t_java_generator.o] Error 1

It's a pretty easy excision.

% gcc --version
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

With this change only, the compiler make succeeds.

% cd compiler/cpp
% make -j3 >&/dev/null
% ./thrift --version
Thrift version 0.19.0
% file thrift
thrift: Mach-O 64-bit executable arm64
  • Did you create an Apache Jira ticket? (Request account here, not required for trivial changes) https://issues.apache.org/jira/browse/THRIFT-5738
  • If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
  • Did you squash your changes to a single commit? (not required, but preferred)
  • Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
  • n/a If your change does not involve any code, include [skip ci] anywhere in the commit message to free up build resources.

@jeffalder jeffalder changed the title Unused variable fails mac builds THRIFT-5738: Unused variable fails mac builds Sep 25, 2023
@Jens-G Jens-G added the java Pull requests that update Java code label Sep 25, 2023
@Jens-G Jens-G merged commit bc9c04d into apache:master Sep 25, 2023
@jeffalder
Copy link
Contributor Author

Thanks @Jens-G !

@jeffalder jeffalder deleted the remove-unused-var branch September 25, 2023 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants