From d035a836ad44ded31664a49fba783092a7344183 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 20 Jul 2023 20:04:39 +0200 Subject: [PATCH] [FIX] 'sprintf' is deprecated sprintf is deprecated since Xcode 14 --- include/sdsl/int_vector_mapper.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/sdsl/int_vector_mapper.hpp b/include/sdsl/int_vector_mapper.hpp index 8e3d9fff..84017421 100644 --- a/include/sdsl/int_vector_mapper.hpp +++ b/include/sdsl/int_vector_mapper.hpp @@ -409,7 +409,11 @@ class temp_file_buffer throw std::runtime_error("could not create temporary file."); } #else - sprintf(tmp_file_name, "%s/tmp_mapper_file_%" PRIu64 "_XXXXXX.sdsl", dir.c_str(), util::pid()); + snprintf(tmp_file_name, + sizeof(tmp_file_name), + "%s/tmp_mapper_file_%" PRIu64 "_XXXXXX.sdsl", + dir.c_str(), + util::pid()); int fd = mkstemps(tmp_file_name, 5); if (fd == -1) {