Skip to content

Commit

Permalink
fix XRPLF#4569: clang warning about deprecated sprintf usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ckeshava committed Oct 4, 2023
1 parent 40ebbec commit 093c810
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ripple/json/impl/json_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,10 +922,8 @@ Reader::getLocationLineAndColumn(Location location) const
{
int line, column;
getLocationLineAndColumn(location, line, column);
constexpr std::size_t n = 18 + 16 + 16 + 1;
char buffer[n];
snprintf(buffer, n, "Line %d, Column %d", line, column);
return buffer;
return "Line " + std::to_string(line) + ", Column " +
std::to_string(column);
}

std::string
Expand Down

0 comments on commit 093c810

Please sign in to comment.