CI: update macOS runner to macos-13

This commit is contained in:
Benoit Blanchon
2024-06-17 13:54:43 +02:00
parent d83515dcda
commit 55c3b9b3a7
3 changed files with 14 additions and 11 deletions

View File

@@ -203,14 +203,17 @@ jobs:
xcode: xcode:
name: XCode name: XCode
needs: clang needs: clang
runs-on: macos-11 runs-on: macos-13
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- xcode: "11.7" - xcode: "14.1"
- xcode: "12.4" - xcode: "14.2"
- xcode: "13.2.1" - xcode: "14.3.1"
- xcode: "15.0.1"
- xcode: "15.1"
- xcode: "15.2"
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@@ -56,31 +56,31 @@ class AllocatorLogEntry {
inline AllocatorLogEntry Allocate(size_t s) { inline AllocatorLogEntry Allocate(size_t s) {
char buffer[32]; char buffer[32];
sprintf(buffer, "allocate(%zu)", s); snprintf(buffer, sizeof(buffer), "allocate(%zu)", s);
return AllocatorLogEntry(buffer); return AllocatorLogEntry(buffer);
} }
inline AllocatorLogEntry AllocateFail(size_t s) { inline AllocatorLogEntry AllocateFail(size_t s) {
char buffer[32]; char buffer[32];
sprintf(buffer, "allocate(%zu) -> nullptr", s); snprintf(buffer, sizeof(buffer), "allocate(%zu) -> nullptr", s);
return AllocatorLogEntry(buffer); return AllocatorLogEntry(buffer);
} }
inline AllocatorLogEntry Reallocate(size_t s1, size_t s2) { inline AllocatorLogEntry Reallocate(size_t s1, size_t s2) {
char buffer[32]; char buffer[32];
sprintf(buffer, "reallocate(%zu, %zu)", s1, s2); snprintf(buffer, sizeof(buffer), "reallocate(%zu, %zu)", s1, s2);
return AllocatorLogEntry(buffer); return AllocatorLogEntry(buffer);
} }
inline AllocatorLogEntry ReallocateFail(size_t s1, size_t s2) { inline AllocatorLogEntry ReallocateFail(size_t s1, size_t s2) {
char buffer[32]; char buffer[32];
sprintf(buffer, "reallocate(%zu, %zu) -> nullptr", s1, s2); snprintf(buffer, sizeof(buffer), "reallocate(%zu, %zu) -> nullptr", s1, s2);
return AllocatorLogEntry(buffer); return AllocatorLogEntry(buffer);
} }
inline AllocatorLogEntry Deallocate(size_t s) { inline AllocatorLogEntry Deallocate(size_t s) {
char buffer[32]; char buffer[32];
sprintf(buffer, "deallocate(%zu)", s); snprintf(buffer, sizeof(buffer), "deallocate(%zu)", s);
return AllocatorLogEntry(buffer); return AllocatorLogEntry(buffer);
} }

View File

@@ -46,7 +46,7 @@ TEST_CASE("serialize MsgPack object") {
SECTION("map 16") { SECTION("map 16") {
for (int i = 0; i < 16; ++i) { for (int i = 0; i < 16; ++i) {
char key[16]; char key[16];
sprintf(key, "i%X", i); snprintf(key, sizeof(key), "i%X", i);
object[key] = i; object[key] = i;
} }
@@ -62,7 +62,7 @@ TEST_CASE("serialize MsgPack object") {
// //
// for (int i = 0; i < 65536; ++i) { // for (int i = 0; i < 65536; ++i) {
// char kv[16]; // char kv[16];
// sprintf(kv, "%04x", i); // snprintf(kv, sizeof(kv), "%04x", i);
// object[kv] = kv; // object[kv] = kv;
// expected += '\xA4'; // expected += '\xA4';
// expected += kv; // expected += kv;