From da04854d6802471941dbc540b3c7d9e2a8c382da Mon Sep 17 00:00:00 2001 From: yuygfgg <140488233+yuygfgg@users.noreply.github.com> Date: Fri, 20 Sep 2024 20:09:17 +0800 Subject: [PATCH 1/2] fix sprintf deprecated warnings --- src/core/vscore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/vscore.cpp b/src/core/vscore.cpp index ab080422..99efe3b4 100644 --- a/src/core/vscore.cpp +++ b/src/core/vscore.cpp @@ -1493,7 +1493,7 @@ const vs3::VSVideoFormat *VSCore::queryVideoFormat3(vs3::VSColorFamily colorFami if (sampleType == stFloat) strcpy(suffix, (bitsPerSample == 32) ? "S" : "H"); else - sprintf(suffix, "%d", (colorFamily == vs3::cmRGB ? 3:1) * bitsPerSample); + snprintf(suffix, sizeof(suffix), "%d", (colorFamily == vs3::cmRGB ? 3 : 1) * bitsPerSample); const char *yuvName = nullptr; @@ -1853,7 +1853,7 @@ bool VSCore::getVideoFormatName(const VSVideoFormat &format, char *buffer) noexc if (format.sampleType == stFloat) strcpy(suffix, (format.bitsPerSample == 32) ? "S" : "H"); else - sprintf(suffix, "%d", (format.colorFamily == cfRGB ? 3:1) * format.bitsPerSample); + snprintf(suffix, sizeof(suffix), "%d", (format.colorFamily == cfRGB ? 3 : 1) * format.bitsPerSample); const char *yuvName = nullptr; From 00b00a03ae59f1b438b1238c663ae45d2e835419 Mon Sep 17 00:00:00 2001 From: yuygfgg <140488233+yuygfgg@users.noreply.github.com> Date: Wed, 9 Oct 2024 12:42:47 +0800 Subject: [PATCH 2/2] Update macos.yml --- .github/workflows/macos.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 39291e48..3fce1188 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -11,7 +11,7 @@ jobs: CXX: clang++ steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Print compiler version run: ${{ env.CC }} --version @@ -19,7 +19,7 @@ jobs: - name: Install autotools run: | brew update - brew install automake autoconf libtool pkg-config + brew install automake autoconf libtool pkg-config llvm - name: Install zimg run: | @@ -33,7 +33,7 @@ jobs: rm -rf zimg - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: # Version range or exact version of a Python version to use, using SemVer's version range syntax. python-version: 3.9 @@ -48,12 +48,10 @@ jobs: - name: configure run: | + export CC=/opt/homebrew/opt/llvm/bin/clang + export CXX=/opt/homebrew/opt/llvm/bin/clang++ ./autogen.sh - # somehow newer macOS imagemagick requires -fopenmp to build? - ./configure --disable-imwri - - - name: make - run: make -j3 + ./configure - name: make install run: | @@ -62,3 +60,5 @@ jobs: - name: Run test run: python -m unittest discover -s test -p "*test.py" + +