diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-02-15 16:42:34 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-02-28 10:24:52 -0800 |
commit | d23df2d9411a0d80e00a6927fff946f2c5f906bc (patch) | |
tree | 5647a4f1c984f1852877b59781c08d7a6d6a15bb /host/lib/rfnoc/nocscript | |
parent | 4047f692d454446b10af4f67f4c208ba19b4dbef (diff) | |
download | uhd-d23df2d9411a0d80e00a6927fff946f2c5f906bc.tar.gz uhd-d23df2d9411a0d80e00a6927fff946f2c5f906bc.tar.bz2 uhd-d23df2d9411a0d80e00a6927fff946f2c5f906bc.zip |
lib: Fix various type-conversion compiler warnings
This makes more type-conversions explicit, to reduce the number of
warnings specifically for MSVC.
Diffstat (limited to 'host/lib/rfnoc/nocscript')
-rw-r--r-- | host/lib/rfnoc/nocscript/expression.cpp | 2 | ||||
-rw-r--r-- | host/lib/rfnoc/nocscript/parser.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/rfnoc/nocscript/expression.cpp b/host/lib/rfnoc/nocscript/expression.cpp index 32065bda1..5e03485be 100644 --- a/host/lib/rfnoc/nocscript/expression.cpp +++ b/host/lib/rfnoc/nocscript/expression.cpp @@ -49,7 +49,7 @@ expression_literal::expression_literal( _bool_val = true; } else { // lexical cast to bool is too picky - _bool_val = bool(std::stoi(_val)); + _bool_val = (std::stoi(_val) != 0); } break; diff --git a/host/lib/rfnoc/nocscript/parser.cpp b/host/lib/rfnoc/nocscript/parser.cpp index 51a544e47..8ef1b7f44 100644 --- a/host/lib/rfnoc/nocscript/parser.cpp +++ b/host/lib/rfnoc/nocscript/parser.cpp @@ -163,7 +163,7 @@ private: P.expr_stack.top()->set_combiner_safe( expression_container::COMBINE_OR); } - } catch (const uhd::syntax_error& e) { + } catch (const uhd::syntax_error&) { P.error = str(boost::format("Operator %s is mixing operator " "types within this container.") % val); |