From 66cfc803ff0a22e614bdf1a71442739c83f2dda5 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Sat, 7 Sep 2024 16:27:44 -0700 Subject: [PATCH] Add mirror VFD to serial -Werror CI action (#4753) * Add mirror VFD to serial -Werror CI action * NUL terminate mirror_vfd.c strings --- .github/workflows/main-auto-spc.yml | 4 ++-- test/mirror_vfd.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main-auto-spc.yml b/.github/workflows/main-auto-spc.yml index b7ac7c4f50b..f019bb12501 100644 --- a/.github/workflows/main-auto-spc.yml +++ b/.github/workflows/main-auto-spc.yml @@ -428,7 +428,7 @@ jobs: --enable-cxx \ --disable-fortran \ --enable-java \ - --disable-mirror-vfd \ + --enable-mirror-vfd \ --enable-direct-vfd \ --disable-ros3-vfd \ --with-szlib=yes @@ -491,7 +491,7 @@ jobs: --enable-cxx \ --disable-fortran \ --enable-java \ - --disable-mirror-vfd \ + --enable-mirror-vfd \ --enable-direct-vfd \ --disable-ros3-vfd \ --with-szlib=yes diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c index 124fc6a6b0c..fe6695b9a06 100644 --- a/test/mirror_vfd.c +++ b/test/mirror_vfd.c @@ -1236,6 +1236,7 @@ create_mirroring_split_fapl(const char *basename, struct mirrortest_filenames *n mirror_conf.handshake_port = opts->portno; if (strncpy(mirror_conf.remote_ip, opts->ip, H5FD_MIRROR_MAX_IP_LEN) == NULL) TEST_ERROR; + mirror_conf.remote_ip[H5FD_MIRROR_MAX_IP_LEN] = '\0'; if ((splitter_config->wo_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; if (H5Pset_fapl_mirror(splitter_config->wo_fapl_id, &mirror_conf) < 0) @@ -1248,8 +1249,10 @@ create_mirroring_split_fapl(const char *basename, struct mirrortest_filenames *n /* Set file paths for w/o and logfile */ if (strncpy(splitter_config->wo_path, (const char *)names->wo, H5FD_SPLITTER_PATH_MAX) == NULL) TEST_ERROR; + splitter_config->wo_path[H5FD_SPLITTER_PATH_MAX] = '\0'; if (strncpy(splitter_config->log_file_path, (const char *)names->log, H5FD_SPLITTER_PATH_MAX) == NULL) TEST_ERROR; + splitter_config->log_file_path[H5FD_SPLITTER_PATH_MAX] = '\0'; /* Create Splitter FAPL */ if ((ret_value = H5Pcreate(H5P_FILE_ACCESS)) < 0)