This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new ba918b40e2 [chore](macOS) Fix compilation errors caused by the
deprecated function (#13890)
ba918b40e2 is described below
commit ba918b40e27116b1608b57e2d0a27dd6f765dd8b
Author: Adonis Ling <[email protected]>
AuthorDate: Wed Nov 2 13:34:51 2022 +0800
[chore](macOS) Fix compilation errors caused by the deprecated function
(#13890)
---
be/src/vec/exec/format/json/new_json_reader.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/be/src/vec/exec/format/json/new_json_reader.cpp
b/be/src/vec/exec/format/json/new_json_reader.cpp
index add32361e3..a8fbeae1c1 100644
--- a/be/src/vec/exec/format/json/new_json_reader.cpp
+++ b/be/src/vec/exec/format/json/new_json_reader.cpp
@@ -601,15 +601,15 @@ Status
NewJsonReader::_write_data_to_column(rapidjson::Value::ConstValueIterator
break;
case rapidjson::Type::kNumberType:
if (value->IsUint()) {
- wbytes = sprintf(tmp_buf, "%u", value->GetUint());
+ wbytes = snprintf(tmp_buf, sizeof(tmp_buf), "%u",
value->GetUint());
} else if (value->IsInt()) {
- wbytes = sprintf(tmp_buf, "%d", value->GetInt());
+ wbytes = snprintf(tmp_buf, sizeof(tmp_buf), "%d", value->GetInt());
} else if (value->IsUint64()) {
- wbytes = sprintf(tmp_buf, "%" PRIu64, value->GetUint64());
+ wbytes = snprintf(tmp_buf, sizeof(tmp_buf), "%" PRIu64,
value->GetUint64());
} else if (value->IsInt64()) {
- wbytes = sprintf(tmp_buf, "%" PRId64, value->GetInt64());
+ wbytes = snprintf(tmp_buf, sizeof(tmp_buf), "%" PRId64,
value->GetInt64());
} else {
- wbytes = sprintf(tmp_buf, "%f", value->GetDouble());
+ wbytes = snprintf(tmp_buf, sizeof(tmp_buf), "%f",
value->GetDouble());
}
str_value = tmp_buf;
break;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]