From eea920bd60b085258715c882be2802b9bb18ccc0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 4 Sep 2015 16:22:54 +0200 Subject: Fix clang warnings --- build/file.cxx | 5 ++++- build/parser.cxx | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/file.cxx b/build/file.cxx index dd9b294..435746c 100644 --- a/build/file.cxx +++ b/build/file.cxx @@ -277,7 +277,10 @@ namespace build if (t.type () != token_type::name || t.name () != var || ((tt = lex.next ().type ()) != token_type::equal && tt != token_type::plus_equal)) - fail << "variable '" << var << "' expected as first line in " << rbf; + { + error << "variable '" << var << "' expected as first line in " << rbf; + throw failed (); // Suppress "used uninitialized" warning. + } parser p; temp_scope tmp (*global_scope); diff --git a/build/parser.cxx b/build/parser.cxx index cec14e4..59139ba 100644 --- a/build/parser.cxx +++ b/build/parser.cxx @@ -187,8 +187,6 @@ namespace build { // Directory scope. // - scope& prev (*scope_); - dir_path p (move (ns[0].dir)); // Steal. // Relative scopes are opened relative to out, not src. -- cgit v1.1