From aa0198ed1e2adef85dde838ae5b2cb2af3582842 Mon Sep 17 00:00:00 2001 From: glx22 Date: Tue, 8 Jul 2025 00:41:22 +0200 Subject: [PATCH 1/2] Test: macos-15 --- .github/workflows/ci-macos.yml | 2 +- .github/workflows/release-macos.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 2a0cd004287e2..8e95683c9781d 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -21,7 +21,7 @@ jobs: macos: name: CI - runs-on: macos-latest + runs-on: macos-15 env: MACOSX_DEPLOYMENT_TARGET: 10.13 diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml index a5219a0b69f90..4debc2640bc68 100644 --- a/.github/workflows/release-macos.yml +++ b/.github/workflows/release-macos.yml @@ -12,7 +12,7 @@ jobs: macos: name: MacOS - runs-on: macos-latest + runs-on: macos-15 env: MACOSX_DEPLOYMENT_TARGET: 10.13 From fc3cef237c891db1e8ba48c90a2c4595acf6a3ef Mon Sep 17 00:00:00 2001 From: glx22 Date: Sun, 17 Aug 2025 14:54:38 +0200 Subject: [PATCH 2/2] Codefix: [macos] variable length array warnings with clang-17 --- src/os/macosx/string_osx.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/os/macosx/string_osx.cpp b/src/os/macosx/string_osx.cpp index 25cf921af7f01..5285bd0b925f9 100644 --- a/src/os/macosx/string_osx.cpp +++ b/src/os/macosx/string_osx.cpp @@ -235,22 +235,22 @@ CoreTextParagraphLayout::CoreTextVisualRun::CoreTextVisualRun(CTRunRef run, Font this->glyphs.resize(CTRunGetGlyphCount(run)); /* Query map of glyphs to source string index. */ - CFIndex map[this->glyphs.size()]; - CTRunGetStringIndices(run, CFRangeMake(0, 0), map); + std::unique_ptr map = std::make_unique(this->glyphs.size()); + CTRunGetStringIndices(run, CFRangeMake(0, 0), map.get()); this->glyph_to_char.resize(this->glyphs.size()); for (size_t i = 0; i < this->glyph_to_char.size(); i++) this->glyph_to_char[i] = (int)map[i]; - CGPoint pts[this->glyphs.size()]; - CTRunGetPositions(run, CFRangeMake(0, 0), pts); - CGSize advs[this->glyphs.size()]; - CTRunGetAdvances(run, CFRangeMake(0, 0), advs); + std::unique_ptr pts = std::make_unique(this->glyphs.size()); + CTRunGetPositions(run, CFRangeMake(0, 0), pts.get()); + std::unique_ptr advs = std::make_unique(this->glyphs.size()); + CTRunGetAdvances(run, CFRangeMake(0, 0), advs.get()); this->positions.reserve(this->glyphs.size()); /* Convert glyph array to our data type. At the same time, substitute * the proper glyphs for our private sprite glyphs. */ - CGGlyph gl[this->glyphs.size()]; - CTRunGetGlyphs(run, CFRangeMake(0, 0), gl); + std::unique_ptr gl = std::make_unique(this->glyphs.size()); + CTRunGetGlyphs(run, CFRangeMake(0, 0), gl.get()); for (size_t i = 0; i < this->glyphs.size(); i++) { if (buff[this->glyph_to_char[i]] >= SCC_SPRITE_START && buff[this->glyph_to_char[i]] <= SCC_SPRITE_END && (gl[i] == 0 || gl[i] == 3)) { /* A glyph of 0 indidicates not found, while apparently 3 is what char 0xFFFC maps to. */