From e3150deebc50cfbadc14e8a9f0c5afd44558d86b Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 24 Jun 2026 09:41:28 -0500 Subject: [PATCH 1/2] Added -Wextra to unit test workflows to catch more warnings/suggestions Also added -Wno-sign-compare as other workflows have done. Ticket: ENT-14208 --- .github/workflows/asan_unit_tests.yml | 2 +- .github/workflows/macos_unit_tests.yml | 2 +- .github/workflows/unit_tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/asan_unit_tests.yml b/.github/workflows/asan_unit_tests.yml index 804ec2fc..a7f73de0 100644 --- a/.github/workflows/asan_unit_tests.yml +++ b/.github/workflows/asan_unit_tests.yml @@ -16,6 +16,6 @@ jobs: - name: Run autotools / configure run: ./autogen.sh --enable-debug - name: Compile and link (make) - run: make -j8 CFLAGS="-Werror -Wall -fsanitize=address" LDFLAGS="-fsanitize=address" + run: make -j8 CFLAGS="-Werror -Wextra -Wno-sign-compare -Wall -fsanitize=address" LDFLAGS="-fsanitize=address" - name: Run unit tests run: make -C tests/unit CFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address" check diff --git a/.github/workflows/macos_unit_tests.yml b/.github/workflows/macos_unit_tests.yml index 04125f3e..999d8161 100644 --- a/.github/workflows/macos_unit_tests.yml +++ b/.github/workflows/macos_unit_tests.yml @@ -21,6 +21,6 @@ jobs: run: > ./autogen.sh --enable-debug - name: Compile and link - run: MACOSX_DEPLOYMENT_TARGET=15.4 make -j8 CFLAGS="-Werror -Wall" + run: MACOSX_DEPLOYMENT_TARGET=15.4 make -j8 CFLAGS="-Werror -Wextra -Wno-sign-compare -Wall" - name: Run unit tests run: make -C tests/unit check diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 8c059d15..4c53c8d7 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -31,6 +31,6 @@ jobs: - name: Run autotools / configure run: ./autogen.sh --enable-debug - name: Compile and link (make) - run: make CFLAGS="-Wall -Wextra -Werror -Wno-sign-compare" + run: make CFLAGS="-Wall -Wextra -Wno-sign-compare -Werror -Wextra -Wno-sign-compare" - name: Run unit tests run: make -C tests/unit check From 6063dd1c867568065b8d2ae6bb049b8ac7f7f558 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 24 Jun 2026 09:55:32 -0500 Subject: [PATCH 2/2] Fixed unix_dir.c deprecated use of readdir_r on MacOS (darwin) Ticket: ENT-14208 --- libutils/unix_dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libutils/unix_dir.c b/libutils/unix_dir.c index c1f8d05e..dd60b5c3 100644 --- a/libutils/unix_dir.c +++ b/libutils/unix_dir.c @@ -92,7 +92,7 @@ const struct dirent *DirRead(Dir *dir) { assert(dir != NULL); errno = 0; -#ifdef __linux__ +#if defined __linux__ || defined DARWIN return readdir((DIR *) dir->dirh); // Sets errno for error #else // "exotics" use readdir_r