From 9596e15049efae53784af0afe08677008232fc3d Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Thu, 24 Aug 2017 18:35:03 -0600 Subject: [PATCH] Warning / build fixes for gcc7 --- include/chaiscript/dispatchkit/bootstrap.hpp | 2 +- include/chaiscript/dispatchkit/boxed_number.hpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/chaiscript/dispatchkit/bootstrap.hpp b/include/chaiscript/dispatchkit/bootstrap.hpp index 8ae21bfa..67116da6 100644 --- a/include/chaiscript/dispatchkit/bootstrap.hpp +++ b/include/chaiscript/dispatchkit/bootstrap.hpp @@ -111,7 +111,7 @@ namespace chaiscript /// Internal function for converting from a string to a value /// uses ostream operator >> to perform the conversion template - auto parse_string(const std::string &i) + Input parse_string(const std::string &i) { if constexpr (!std::is_same::value && !std::is_same::value diff --git a/include/chaiscript/dispatchkit/boxed_number.hpp b/include/chaiscript/dispatchkit/boxed_number.hpp index 10858b9c..8bb39142 100644 --- a/include/chaiscript/dispatchkit/boxed_number.hpp +++ b/include/chaiscript/dispatchkit/boxed_number.hpp @@ -59,6 +59,7 @@ namespace chaiscript #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wfloat-conversion" +#pragma GCC diagnostic ignored "-Wswitch" #endif /// \brief Represents any numeric type, generically. Used internally for generic operations between POD values @@ -80,7 +81,7 @@ namespace chaiscript }; template - constexpr static inline void check_divide_by_zero(T t) + constexpr static inline void check_divide_by_zero([[maybe_unused]] T t) { #ifndef CHAISCRIPT_NO_PROTECT_DIVIDEBYZERO if constexpr (!std::is_floating_point::value) {