Skip to content

Commit 9d7bc59

Browse files
authored
Remove use of strncat to fix warnings (#4451)
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 928789d commit 9d7bc59

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

third_party/intel/backend/driver.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,10 @@ extern "C" EXPORT_FUNC PyObject *load_binary(PyObject *args) {
306306
n_spills, n_max_threads);
307307

308308
} catch (const std::exception &e) {
309-
char err[1024] = {0};
310-
std::string_view error_str(e.what());
311-
strncat(err, error_str.data(), std::min(error_str.size(), size_t(1024)));
312309
PyGILState_STATE gil_state;
313310
gil_state = PyGILState_Ensure();
314-
PyErr_SetString(PyExc_RuntimeError, err);
315-
std::cerr << "Error during Intel loadBinary: " << err << std::endl;
311+
PyErr_SetString(PyExc_RuntimeError, e.what());
312+
std::cerr << "Error during Intel loadBinary: " << e.what() << std::endl;
316313
PyGILState_Release(gil_state);
317314
return NULL;
318315
}

0 commit comments

Comments
 (0)