Skip to content

Commit 33ddf2f

Browse files
alexmarkovCommit Queue
authored andcommitted
[vm] Fix gcc build
Fix the following error: ``` ../../runtime/bin/main_options.cc:642:8: error: variable ‘run_script’ set but not used [-Werror=unused-but-set-variable] 642 | bool run_script = false; | ^~~~~~~~~~ ``` TEST=ci Change-Id: I4b554ed604a14e5d8b9043971d9837c82ec840ce Cq-Include-Trybots: luci.dart.try:vm-gcc-linux-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439980 Auto-Submit: Alexander Markov <[email protected]> Commit-Queue: Alexander Aprelev <[email protected]> Reviewed-by: Alexander Aprelev <[email protected]> Commit-Queue: Alexander Markov <[email protected]>
1 parent 6b21b5f commit 33ddf2f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

runtime/bin/main_options.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,9 @@ bool Options::ParseArguments(int argc,
639639
// The arguments to the VM are at positions 1 through i-1 in argv.
640640
Platform::SetExecutableArguments(i, argv);
641641

642+
#if !defined(DART_PRECOMPILED_RUNTIME)
642643
bool run_script = false;
644+
#endif
643645
// Get the script name.
644646
if (i < argc) {
645647
#if !defined(DART_PRECOMPILED_RUNTIME)
@@ -654,7 +656,9 @@ bool Options::ParseArguments(int argc,
654656
if (Options::disable_dart_dev() ||
655657
(Options::snapshot_filename() != nullptr) || is_potential_file_path) {
656658
*script_name = Utils::StrDup(argv[i]);
659+
#if !defined(DART_PRECOMPILED_RUNTIME)
657660
run_script = true;
661+
#endif
658662
i++;
659663
}
660664
#if !defined(DART_PRECOMPILED_RUNTIME)

0 commit comments

Comments
 (0)