summaryrefslogtreecommitdiffstats
path: root/parse.cxx
diff options
context:
space:
mode:
authorfche <fche>2007-04-18 11:11:55 +0000
committerfche <fche>2007-04-18 11:11:55 +0000
commit9e98eb72a7aeca4d95e17b5d518e2c5585113be7 (patch)
treed28a25854c8e16e433b0bb892774a857824d92b7 /parse.cxx
parente4cc28c6c2da26e6150a28c1bf125e91c8a6691d (diff)
downloadsystemtap-steved-9e98eb72a7aeca4d95e17b5d518e2c5585113be7.tar.gz
systemtap-steved-9e98eb72a7aeca4d95e17b5d518e2c5585113be7.tar.xz
systemtap-steved-9e98eb72a7aeca4d95e17b5d518e2c5585113be7.zip
2007-04-18 Frank Ch. Eigler <fche@elastic.org>
* parse.cxx (scan_pp): Correct warnings from if/if/else nesting.
Diffstat (limited to 'parse.cxx')
-rw-r--r--parse.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/parse.cxx b/parse.cxx
index a960e249..9132d0b5 100644
--- a/parse.cxx
+++ b/parse.cxx
@@ -307,10 +307,10 @@ parser::scan_pp (bool expand_args)
{
m = scan_pp (result); // NB: recursive
if (m == 0)
- if (have_token)
- throw parse_error ("incomplete conditional - missing %: or %)", t);
- else
- throw parse_error ("missing THEN tokens for conditional", t);
+ throw parse_error (have_token ?
+ "incomplete conditional - missing %: or %)" :
+ "missing THEN tokens for conditional",
+ t);
have_token = true;
if (m->type == tok_operator && (m->content == "%:" || // ELSE
@@ -332,11 +332,11 @@ parser::scan_pp (bool expand_args)
{
m = scan_pp (expand_args && !result); // NB: recursive
if (m == 0)
- if (have_token)
- throw parse_error ("incomplete conditional - missing %)", t);
- else
- throw parse_error ("missing ELSE tokens for conditional", t);
-
+ throw parse_error (have_token ?
+ "incomplete conditional - missing %)" :
+ "missing ELSE tokens for conditional",
+ t);
+
have_token = true;
if (m->type == tok_operator && m->content == "%)") // END
break;