diff options
Diffstat (limited to 'Source/cmStringCommand.cxx')
| -rw-r--r-- | Source/cmStringCommand.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index e5935b8..fe311d1 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -55,7 +55,6 @@ bool joinImpl(std::vector<std::string> const& args, std::string const& glue, bool HandleHashCommand(std::vector<std::string> const& args, cmExecutionStatus& status) { -#if !defined(CMAKE_BOOTSTRAP) if (args.size() != 3) { status.SetError( cmStrCat(args[0], " requires an output variable and an input string")); @@ -69,10 +68,6 @@ bool HandleHashCommand(std::vector<std::string> const& args, return true; } return false; -#else - status.SetError(cmStrCat(args[0], " not available during bootstrap")); - return false; -#endif } bool HandleToUpperLowerCommand(std::vector<std::string> const& args, @@ -148,7 +143,8 @@ bool HandleHexCommand(std::vector<std::string> const& args, std::string::size_type hexIndex = 0; for (auto const& c : instr) { - sprintf(&output[hexIndex], "%.2x", static_cast<unsigned char>(c) & 0xFF); + snprintf(&output[hexIndex], 3, "%.2x", + static_cast<unsigned char>(c) & 0xFF); hexIndex += 2; } @@ -1106,8 +1102,8 @@ bool HandleJSONCommand(std::vector<std::string> const& arguments, mode != "EQUAL"_s) { throw json_error( { "got an invalid mode '"_s, mode, - "', expected one of GET, GET_ARRAY, TYPE, MEMBER, MEMBERS," - " LENGTH, REMOVE, SET, EQUAL"_s }); + "', expected one of GET, TYPE, MEMBER, LENGTH, REMOVE, SET, " + " EQUAL"_s }); } const auto& jsonstr = args.PopFront("missing json string argument"_s); |
