This is an automated email from the ASF dual-hosted git repository.

willayd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git


The following commit(s) were added to refs/heads/main by this push:
     new e9fb24cc ci: Set Werror in Windows Meson configuration (#779)
e9fb24cc is described below

commit e9fb24ccd92c95ad71a67885396e8d8365a68c10
Author: William Ayd <[email protected]>
AuthorDate: Fri Jun 13 08:39:35 2025 -0400

    ci: Set Werror in Windows Meson configuration (#779)
---
 .github/workflows/build-and-test.yaml | 1 +
 meson.build                           | 2 +-
 src/nanoarrow/ipc/reader_test.cc      | 8 ++++++++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/build-and-test.yaml 
b/.github/workflows/build-and-test.yaml
index eda6a51c..539ba6fd 100644
--- a/.github/workflows/build-and-test.yaml
+++ b/.github/workflows/build-and-test.yaml
@@ -185,6 +185,7 @@ jobs:
         run: |
           meson setup builddir `
               --vsenv `
+              -Dwerror=true `
               -Dipc=enabled `
               -Dtests=enabled
           meson compile -C builddir
diff --git a/meson.build b/meson.build
index 5349eaf2..7e384893 100644
--- a/meson.build
+++ b/meson.build
@@ -145,7 +145,7 @@ if get_option('ipc').enabled()
         link_with: nanoarrow_ipc_lib,
         dependencies: [nanoarrow_dep],
     )
-    zlib_dep = dependency('zlib')
+    zlib_dep = dependency('zlib', default_options: ['tests=disabled'])
 else
     flatcc_dep = disabler()
     nanoarrow_ipc_dep = disabler()
diff --git a/src/nanoarrow/ipc/reader_test.cc b/src/nanoarrow/ipc/reader_test.cc
index cd6374a6..8139503a 100644
--- a/src/nanoarrow/ipc/reader_test.cc
+++ b/src/nanoarrow/ipc/reader_test.cc
@@ -115,7 +115,15 @@ TEST(NanoarrowIpcReader, InputStreamFile) {
   ASSERT_EQ(ArrowIpcInputStreamInitFile(&stream, nullptr, 1), EINVAL);
 
   uint8_t input_data[] = {0x01, 0x02, 0x03, 0x04, 0x05};
+#ifdef _MSC_VER
+  // This macro suppresses warnings when using tmpfile and the MSVC compiler
+  // warning C4996: 'tmpfile': This function or variable may be unsafe. 
Consider
+  // using tmpfile_s instead. To disable deprecation, use 
_CRT_SECURE_NO_WARNINGS
+  FILE* file_ptr;
+  ASSERT_EQ(tmpfile_s(&file_ptr), 0);
+#else
   FILE* file_ptr = tmpfile();
+#endif
   FileCloser closer{file_ptr};
   ASSERT_NE(file_ptr, nullptr);
   ASSERT_EQ(fwrite(input_data, 1, sizeof(input_data), file_ptr), 
sizeof(input_data));

Reply via email to