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
dart build fails in two places with "variable ... set but not used" error #737
Comments
This comment was originally written by ladicek@gmail.com Ran into this too. I'm using GCC 4.6.1, which is (I guess) newer than Google people use. My workaround is to remove '-Werror' from compiler flags (in tools/gyp/configurations_make.gypi). I'm a big fan of static analysis, but it makes no sense to abort compilation because of some warnings that developers never saw, as they are using an older version of the compiler. |
This comment was originally written by drfibonacci@google.com Added Area-Build, OpSys-Linux, Triaged labels. |
This comment was originally written by prujoh...@gmail.com See the comments in the Building Dart document: http://code.google.com/p/dart/wiki/Building The way I handle this is to have the older compiler installed and then... export CXX=g++-4.4 CC=gcc-4.4 ...before running the build. |
Added AssumedStale label. |
Removed Area-Build label. |
…ions) https://dart.googlesource.com/protobuf/+log/9cf05f6e9f53..8337a7910fef 2022-08-22 omersa@google.com Rename _reportTruncatedMessage -> _throwTruncatedMessageError (#737) 2022-08-22 omersa@google.com Add GrpcServiceName annotation to gRPC classes (#733) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-protobuf-dart-sdk Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human is aware of the problem. To file a bug in Dart Protobuf Support: https://github.com/dart-lang/protobuf/issues To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Tbr: dart-ecosystem-gardener@grotations.appspotmail.com Change-Id: Idc3d5a834fb6c9f08a73b11a4b1ac3b889001282 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255842 Reviewed-by: Nate Bosch <nbosch@google.com> Commit-Queue: Nate Bosch <nbosch@google.com>
This issue was originally filed by sean.phon...@gmail.com
What steps will reproduce the problem?
What is the expected output? What do you see instead?
First error:
runtime/third_party/double-conversion/src/double-conversion.cc:607:8: error: variable ‘fractional_part’ set but not used [-Werror=unused-but-set-variable]
Second error:
runtime/vm/dart_api_impl_test.cc:1342:15: error: variable ‘result’ set but not used [-Werror=unused-but-set-variable]
In both cases, the build fails at that point with:
cc1plus: all warnings being treated as errors
...
make: *** Waiting for unfinished jobs....
BUILD FAILED
What version of the product are you using? On what operating system?
gclient sync was performed against the repository several hours ago into a clean directory. This was my first build of dart, on Ubuntu 11.10 on a 32-bit Toshiba QOSMIO laptop.
Please provide any additional information below.
I commented out the two instances of the unused variable to get past the first error, and to get past the second error I wrapped the 'result' variable in an assertion so that the compiler would see that it was used. I would not go so far as to call these fixes, as I was just trying to get the build to complete.
The text was updated successfully, but these errors were encountered: