diff --git a/include/nlohmann/detail/input/lexer.hpp b/include/nlohmann/detail/input/lexer.hpp index 3d63229f9..4742d889b 100644 --- a/include/nlohmann/detail/input/lexer.hpp +++ b/include/nlohmann/detail/input/lexer.hpp @@ -863,6 +863,8 @@ class lexer : public lexer_base break; } } + + JSON_HEDLEY_UNREACHABLE(); } // multi-line comments skip input until */ is read @@ -898,6 +900,8 @@ class lexer : public lexer_base continue; } } + + JSON_HEDLEY_UNREACHABLE(); } // unexpected character after reading '/' diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 7d68c5add..e2bb8517b 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -8055,6 +8055,8 @@ class lexer : public lexer_base break; } } + + JSON_HEDLEY_UNREACHABLE(); } // multi-line comments skip input until */ is read @@ -8090,6 +8092,8 @@ class lexer : public lexer_base continue; } } + + JSON_HEDLEY_UNREACHABLE(); } // unexpected character after reading '/'