From 55c3b9b3a7730051f94690836d81fd2443231304 Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Mon, 17 Jun 2024 13:54:43 +0200 Subject: [PATCH] CI: update macOS runner to `macos-13` --- .github/workflows/ci.yml | 11 +++++++---- extras/tests/Helpers/Allocators.hpp | 10 +++++----- extras/tests/MsgPackSerializer/serializeObject.cpp | 4 ++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c032b26c..ce7043ed1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -203,14 +203,17 @@ jobs: xcode: name: XCode needs: clang - runs-on: macos-11 + runs-on: macos-13 strategy: fail-fast: false matrix: include: - - xcode: "11.7" - - xcode: "12.4" - - xcode: "13.2.1" + - xcode: "14.1" + - xcode: "14.2" + - xcode: "14.3.1" + - xcode: "15.0.1" + - xcode: "15.1" + - xcode: "15.2" steps: - name: Checkout uses: actions/checkout@v4 diff --git a/extras/tests/Helpers/Allocators.hpp b/extras/tests/Helpers/Allocators.hpp index 6877eaf19..095d726a6 100644 --- a/extras/tests/Helpers/Allocators.hpp +++ b/extras/tests/Helpers/Allocators.hpp @@ -56,31 +56,31 @@ class AllocatorLogEntry { inline AllocatorLogEntry Allocate(size_t s) { char buffer[32]; - sprintf(buffer, "allocate(%zu)", s); + snprintf(buffer, sizeof(buffer), "allocate(%zu)", s); return AllocatorLogEntry(buffer); } inline AllocatorLogEntry AllocateFail(size_t s) { char buffer[32]; - sprintf(buffer, "allocate(%zu) -> nullptr", s); + snprintf(buffer, sizeof(buffer), "allocate(%zu) -> nullptr", s); return AllocatorLogEntry(buffer); } inline AllocatorLogEntry Reallocate(size_t s1, size_t s2) { char buffer[32]; - sprintf(buffer, "reallocate(%zu, %zu)", s1, s2); + snprintf(buffer, sizeof(buffer), "reallocate(%zu, %zu)", s1, s2); return AllocatorLogEntry(buffer); } inline AllocatorLogEntry ReallocateFail(size_t s1, size_t s2) { char buffer[32]; - sprintf(buffer, "reallocate(%zu, %zu) -> nullptr", s1, s2); + snprintf(buffer, sizeof(buffer), "reallocate(%zu, %zu) -> nullptr", s1, s2); return AllocatorLogEntry(buffer); } inline AllocatorLogEntry Deallocate(size_t s) { char buffer[32]; - sprintf(buffer, "deallocate(%zu)", s); + snprintf(buffer, sizeof(buffer), "deallocate(%zu)", s); return AllocatorLogEntry(buffer); } diff --git a/extras/tests/MsgPackSerializer/serializeObject.cpp b/extras/tests/MsgPackSerializer/serializeObject.cpp index bf25f1d25..07774d03d 100644 --- a/extras/tests/MsgPackSerializer/serializeObject.cpp +++ b/extras/tests/MsgPackSerializer/serializeObject.cpp @@ -46,7 +46,7 @@ TEST_CASE("serialize MsgPack object") { SECTION("map 16") { for (int i = 0; i < 16; ++i) { char key[16]; - sprintf(key, "i%X", i); + snprintf(key, sizeof(key), "i%X", i); object[key] = i; } @@ -62,7 +62,7 @@ TEST_CASE("serialize MsgPack object") { // // for (int i = 0; i < 65536; ++i) { // char kv[16]; - // sprintf(kv, "%04x", i); + // snprintf(kv, sizeof(kv), "%04x", i); // object[kv] = kv; // expected += '\xA4'; // expected += kv;