From c77203ae51318918d7438f723697130557cc484a Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Thu, 30 Oct 2025 16:58:22 -0400 Subject: [PATCH 1/3] Fixed sizeof() call in P1_PrintData(). --- c/src/point_one/polaris/polaris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/src/point_one/polaris/polaris.c b/c/src/point_one/polaris/polaris.c index f04440d..f9d3d50 100644 --- a/c/src/point_one/polaris/polaris.c +++ b/c/src/point_one/polaris/polaris.c @@ -1385,7 +1385,7 @@ void P1_PrintData(const uint8_t* buffer, size_t length) { } str_length += - snprintf(str + str_length, sizeof(str - str_length), "%02x", buffer[i]); + snprintf(str + str_length, sizeof(str) - str_length, "%02x", buffer[i]); if (i % 16 == 15) { str[str_length++] = '\0'; From b9923f8b77ea8d80bb69e297b8902e5f315dd63a Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Fri, 31 Oct 2025 10:07:56 -0400 Subject: [PATCH 2/3] Specify both CXX and CC for CI cmake builds. --- .github/workflows/release_build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index 8dbec05..3cba1e6 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -51,6 +51,11 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | echo "CXX=/usr/bin/${{ matrix.compiler }}" >> $GITHUB_ENV + if [[ "${{ matrix.compiler }}" == "clang++" ]]; then + echo "CC=/usr/bin/clang" >> $GITHUB_ENV + else + echo "CC=/usr/bin/gcc" >> $GITHUB_ENV + fi echo "EXT=" >> $GITHUB_ENV # Just for Github action builds set USE_BAZEL_VERSION to override the # bazelversion file so we can test different Bazel versions even though @@ -224,6 +229,11 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | echo "CXX=/usr/bin/${{ matrix.compiler }}" >> $GITHUB_ENV + if [[ "${{ matrix.compiler }}" == "clang++" ]]; then + echo "CC=/usr/bin/clang" >> $GITHUB_ENV + else + echo "CC=/usr/bin/gcc" >> $GITHUB_ENV + fi echo "EXT=" >> $GITHUB_ENV # Just for Github action builds set USE_BAZEL_VERSION to override the # bazelversion file so we can test different Bazel versions even though From 91e114a4fccf75bc7315c2be1a2e901f559b6eb2 Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Fri, 31 Oct 2025 09:58:41 -0400 Subject: [PATCH 3/3] Build C/C++ libraries with clang in CI. --- .github/workflows/release_build.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index 3cba1e6..22eff31 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -30,6 +30,10 @@ jobs: os: ubuntu-latest tool: bazel-6.5.0 compiler: g++ + - arch: x64 + os: ubuntu-latest + tool: cmake + compiler: clang++ # Windows not currently supported by C++ library. #- arch: x64 # os: windows-latest @@ -206,12 +210,16 @@ jobs: os: [ubuntu-latest] tool: [make, cmake, bazel-4.2.2, bazel-6.5.0] compiler: [g++] - #include: - # Windows not currently supported by C library. - # - arch: x64 - # os: windows-latest - # tool: cmake - # compiler: msvc + include: + - arch: x64 + os: ubuntu-latest + tool: cmake + compiler: clang++ + # Windows not currently supported by C library. + #- arch: x64 + # os: windows-latest + # tool: cmake + # compiler: msvc defaults: run: shell: bash