From f09b2d87315131a931a09ef4613fd13c5cfb9798 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Sat, 26 May 2018 20:29:25 -0600 Subject: [PATCH] Update release notes and fix compiler warnings --- include/chaiscript/language/chaiscript_parser.hpp | 6 ++++-- releasenotes.md | 1 + src/libfuzzer_client.cpp | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/chaiscript/language/chaiscript_parser.hpp b/include/chaiscript/language/chaiscript_parser.hpp index 919fea86..f311286c 100644 --- a/include/chaiscript/language/chaiscript_parser.hpp +++ b/include/chaiscript/language/chaiscript_parser.hpp @@ -760,6 +760,7 @@ namespace chaiscript #ifdef CHAISCRIPT_CLANG #pragma GCC diagnostic ignored "-Wtautological-compare" +#pragma GCC diagnostic ignored "-Wsign-conversion" #endif #endif @@ -774,8 +775,9 @@ namespace chaiscript return const_var(static_cast(u)); } else if (!unsigned_ && !longlong_ && u >= std::numeric_limits::min() && u <= std::numeric_limits::max()) { return const_var(static_cast(u)); - } else if ((unsigned_ || base != 10) && !longlong_ - && u >= std::numeric_limits::min() + } else if ((unsigned_ || base != 10) && !longlong_ + + && u >= std::numeric_limits::min() && u <= std::numeric_limits::max()) { return const_var(static_cast(u)); } else if (!unsigned_ && u >= std::numeric_limits::min() && u <= std::numeric_limits::max()) { diff --git a/releasenotes.md b/releasenotes.md index 41b6af19..2d93f41a 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -12,6 +12,7 @@ Current Version: 6.1.0 * Various JSON fixes #377 #400 #409 #371 @totalgee @dinghram @arcoRocks * Various cleanups, bugfixes and warning fixes and minor performance improvements * Support for C++17 compilers! + * Support for UTF8 BOM #439 @AlekMosingiewicz @MarioLiebisch ### Changes since 5.8.6 diff --git a/src/libfuzzer_client.cpp b/src/libfuzzer_client.cpp index deb83c77..28927ee1 100644 --- a/src/libfuzzer_client.cpp +++ b/src/libfuzzer_client.cpp @@ -332,15 +332,15 @@ def assert_throws(desc, x) chai.eval(std::string(reinterpret_cast(data), size)); std::ofstream ofs("VALID/" + sha); ofs << input; - } catch (const chaiscript::exception::eval_error &ee) { + } catch (const chaiscript::exception::eval_error &) { std::ofstream ofs("EVAL_ERROR/" + sha); ofs << input; - } catch (const chaiscript::Boxed_Value &e) { + } catch (const chaiscript::Boxed_Value &) { std::ofstream ofs("BOXED_VALUE/" + sha); ofs << input; } catch (const chaiscript::exception::load_module_error &e) { std::cout << "Unhandled module load error\n" << e.what() << '\n'; - } catch (const std::exception &e) { + } catch (const std::exception &) { std::ofstream ofs("STD_EXCEPTION/" + sha); ofs << input; } catch (...) {