diff options
author | fche <fche> | 2007-04-18 11:11:55 +0000 |
---|---|---|
committer | fche <fche> | 2007-04-18 11:11:55 +0000 |
commit | 9e98eb72a7aeca4d95e17b5d518e2c5585113be7 (patch) | |
tree | d28a25854c8e16e433b0bb892774a857824d92b7 /parse.cxx | |
parent | e4cc28c6c2da26e6150a28c1bf125e91c8a6691d (diff) | |
download | systemtap-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.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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; |