Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package zix for openSUSE:Factory checked in 
at 2026-10-18 22:54:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zix (Old)
 and      /work/SRC/openSUSE:Factory/.zix.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "zix"

Sun Oct 18 22:54:12 2026 rev:5 rq:1385254 version:0.8.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/zix/zix.changes  2025-12-11 18:35:06.021742655 
+0100
+++ /work/SRC/openSUSE:Factory/.zix.new.3698736/zix.changes     2026-10-18 
22:54:30.726108330 +0200
@@ -1,0 +2,10 @@
+Fri Oct 16 15:04:12 UTC 2026 - Bjørn Lie <[email protected]>
+
+- Update to version 0.8.2:
+  * Fix build with configure checks disabled
+  * Fix handling of invalid ring size parameters
+  * Fix potential out of bounds access on error
+- Drop unneeded cmake BuildRequires.
+- Use autosetup and ldconfig_scriptlets macros.
+
+-------------------------------------------------------------------

Old:
----
  zix-v0.8.0.tar.bz2

New:
----
  zix-v0.8.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ zix.spec ++++++
--- /var/tmp/diff_new_pack.Bb44f2/_old  2026-10-18 22:54:32.224171042 +0200
+++ /var/tmp/diff_new_pack.Bb44f2/_new  2026-10-18 22:54:32.225171084 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package zix
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,15 @@
 
 %define sover 0
 Name:           zix
-Version:        0.8.0
+Version:        0.8.2
 Release:        0
 Summary:        A lightweight C library of portability wrappers and data 
structures
 License:        ISC
 Group:          Development/Libraries/C and C++
 URL:            https://gitlab.com/drobilla/zix
-Source0:        
https://gitlab.com/drobilla/zix/-/archive/v%{version}/%{name}-v%{version}.tar.bz2
+Source0:        %{url}/-/archive/v%{version}/%{name}-v%{version}.tar.bz2
 Source99:       baselibs.conf
-BuildRequires:  cmake
+
 BuildRequires:  doxygen
 BuildRequires:  gcc-c++
 BuildRequires:  graphviz
@@ -68,7 +68,7 @@
 File System
 
 %prep
-%setup -q -n %{name}-v%{version}
+%autosetup -n %{name}-v%{version}
 
 %build
 %meson -Ddocs=disabled
@@ -77,8 +77,7 @@
 %install
 %meson_install
 
-%post -n libzix-0-%{sover} -p /sbin/ldconfig
-%postun -n libzix-0-%{sover} -p /sbin/ldconfig
+%ldconfig_scriptlets -n libzix-0-%{sover}
 
 %files -n libzix-0-%{sover}
 %{_libdir}/libzix-0.so.%{sover}

++++++ zix-v0.8.0.tar.bz2 -> zix-v0.8.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/.clang-format new/zix-v0.8.2/.clang-format
--- old/zix-v0.8.0/.clang-format        2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/.clang-format        2026-06-11 20:52:36.000000000 +0200
@@ -6,6 +6,7 @@
 AlignConsecutiveDeclarations: true
 AlignEscapedNewlines: Left
 AttributeMacros:
+  - ZIX_ALLOCATED
   - ZIX_ALLOC_COUNT_SIZE
   - ZIX_ALLOC_SIZE
   - ZIX_ALWAYS_INLINE_FUNC
@@ -16,10 +17,13 @@
   - ZIX_MALLOC_FUNC
   - ZIX_NODISCARD
   - ZIX_NONBLOCKING
+  - ZIX_NONNULL
+  - ZIX_NULLABLE
   - ZIX_PURE_API
   - ZIX_PURE_FUNC
   - ZIX_PURE_WIN_API
   - ZIX_REALTIME
+  - ZIX_UNSPECIFIED
 BasedOnStyle: Mozilla
 BraceWrapping:
   AfterEnum: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/.gitignore new/zix-v0.8.2/.gitignore
--- old/zix-v0.8.0/.gitignore   2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/.gitignore   2026-06-11 20:52:36.000000000 +0200
@@ -3,9 +3,9 @@
 
 /.meson-subproject-wrap-hash.txt
 /build/
+/subprojects/.wraplock
 /subprojects/packagecache/
-/subprojects/sphinxygen-1.0.10/
-/subprojects/sphinxygen/
+/subprojects/sphinxygen-1.0.12/
 
 *.pyc
 __pycache__/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/NEWS new/zix-v0.8.2/NEWS
--- old/zix-v0.8.0/NEWS 2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/NEWS 2026-06-11 20:52:36.000000000 +0200
@@ -1,3 +1,11 @@
+zix (0.8.2) stable; urgency=medium
+
+  * Fix build with configure checks disabled
+  * Fix handling of invalid ring size parameters
+  * Fix potential out of bounds access on error
+
+ -- David Robillard <[email protected]>  Thu, 11 Jun 2026 18:52:03 +0000
+
 zix (0.8.0) stable; urgency=medium
 
   * Add ZIX_REALTIME and ZIX_NONBLOCKING attributes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/benchmark/warnings.h 
new/zix-v0.8.2/benchmark/warnings.h
--- old/zix-v0.8.0/benchmark/warnings.h 2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/benchmark/warnings.h 2026-06-11 20:52:36.000000000 +0200
@@ -6,7 +6,7 @@
 
 #include <zix/warnings.h>
 
-#if defined(__clang__)
+#ifdef __clang__
 
 #  define ZIX_DISABLE_GLIB_WARNINGS                                         \
     _Pragma("clang diagnostic push")                                        \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/include/zix/attributes.h 
new/zix-v0.8.2/include/zix/attributes.h
--- old/zix-v0.8.0/include/zix/attributes.h     2025-11-12 19:44:25.000000000 
+0100
+++ new/zix-v0.8.2/include/zix/attributes.h     2026-06-11 20:52:36.000000000 
+0200
@@ -87,7 +87,7 @@
 #endif
 
 // Unused parameter macro to suppresses warnings and make it impossible to use
-#if defined(__cplusplus)
+#ifdef __cplusplus
 #  define ZIX_UNUSED(name)
 #elif defined(__GNUC__) || defined(__clang__)
 #  define ZIX_UNUSED(name) name##_unused __attribute__((__unused__))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/include/zix/btree.h 
new/zix-v0.8.2/include/zix/btree.h
--- old/zix-v0.8.0/include/zix/btree.h  2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/include/zix/btree.h  2026-06-11 20:52:36.000000000 +0200
@@ -83,7 +83,7 @@
 ZIX_API void
 zix_btree_free(ZixBTree* ZIX_NULLABLE           t,
                ZixBTreeDestroyFunc ZIX_NULLABLE destroy,
-               const void* ZIX_NULLABLE         destroy_data);
+               const void* ZIX_UNSPECIFIED      destroy_data);
 
 /**
    Clear everything from `t`, leaving it empty.
@@ -98,7 +98,7 @@
 ZIX_API void
 zix_btree_clear(ZixBTree* ZIX_NONNULL            t,
                 ZixBTreeDestroyFunc ZIX_NULLABLE destroy,
-                const void* ZIX_NULLABLE         destroy_data);
+                const void* ZIX_UNSPECIFIED      destroy_data);
 
 /// Return the number of elements in `t`
 ZIX_PURE_API ZIX_REALTIME size_t
@@ -238,7 +238,7 @@
 ZIX_API ZixStatus
 zix_btree_lower_bound(const ZixBTree* ZIX_NONNULL      t,
                       ZixBTreeCompareFunc ZIX_NULLABLE compare_key,
-                      const void* ZIX_NULLABLE         compare_key_data,
+                      const void* ZIX_UNSPECIFIED      compare_key_data,
                       const void* ZIX_UNSPECIFIED      key,
                       ZixBTreeIter* ZIX_NONNULL        ti);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/include/zix/filesystem.h 
new/zix-v0.8.2/include/zix/filesystem.h
--- old/zix-v0.8.0/include/zix/filesystem.h     2025-11-12 19:44:25.000000000 
+0100
+++ new/zix-v0.8.2/include/zix/filesystem.h     2026-06-11 20:52:36.000000000 
+0200
@@ -94,7 +94,7 @@
                        const char* ZIX_NONNULL    dir_path);
 
 /**
-   Create a hard link at path `link` that points to path `target`.
+   Create a hard link at `link_path` that points to `target_path`.
 
    @return #ZIX_STATUS_SUCCESS, or an error.
 */
@@ -103,7 +103,7 @@
                      const char* ZIX_NONNULL link_path);
 
 /**
-   Create a symbolic link at path `link` that points to path `target`.
+   Create a symbolic link at `link_path` that points to `target_path`.
 
    Note that portable code should use zix_create_directory_symlink() if the
    target is a directory, since this function won't work for that on some
@@ -116,7 +116,7 @@
                    const char* ZIX_NONNULL link_path);
 
 /**
-   Create a symbolic link at path `link` that points to the directory `target`.
+   Create a symbolic link at `link_path` that points to `target_path`.
 
    This is a separate function from zix_create_symlink() because some systems
    (like Windows) require directory symlinks to be created specially.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/include/zix/hash.h 
new/zix-v0.8.2/include/zix/hash.h
--- old/zix-v0.8.0/include/zix/hash.h   2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/include/zix/hash.h   2026-06-11 20:52:36.000000000 +0200
@@ -25,21 +25,21 @@
 */
 
 // ZIX_HASH_KEY_TYPE can be defined to make the API more type-safe
-#if defined(ZIX_HASH_KEY_TYPE)
+#ifdef ZIX_HASH_KEY_TYPE
 typedef ZIX_HASH_KEY_TYPE ZixHashKey;
 #else
 typedef void ZixHashKey; ///< The type of a key within a record
 #endif
 
 // ZIX_HASH_RECORD_TYPE can be defined to make the API more type-safe
-#if defined(ZIX_HASH_RECORD_TYPE)
+#ifdef ZIX_HASH_RECORD_TYPE
 typedef ZIX_HASH_RECORD_TYPE ZixHashRecord;
 #else
 typedef void ZixHashRecord; ///< The type of a hash table record
 #endif
 
 // ZIX_HASH_SEARCH_DATA_TYPE can be defined to make the API more type-safe
-#if defined(ZIX_HASH_SEARCH_DATA_TYPE)
+#ifdef ZIX_HASH_SEARCH_DATA_TYPE
 typedef ZIX_HASH_SEARCH_DATA_TYPE ZixHashSearchData;
 #else
 typedef void ZixHashSearchData; ///< User data for key comparison function
@@ -153,9 +153,9 @@
 */
 
 /// User function for determining if a key matches in a custom search
-typedef bool (*ZixKeyMatchFunc)(const ZixHashKey* ZIX_NONNULL key,
-                                const ZixHashSearchData* ZIX_NULLABLE
-                                  user_data);
+typedef bool (*ZixKeyMatchFunc)(
+  const ZixHashKey* ZIX_NONNULL            key,
+  const ZixHashSearchData* ZIX_UNSPECIFIED user_data);
 
 /**
    A "plan" (position) to insert a record in a hash table.
@@ -206,10 +206,11 @@
    with (the first argument) matches the key to be inserted.
 */
 ZIX_API ZixHashInsertPlan
-zix_hash_plan_insert_prehashed(const ZixHash* ZIX_NONNULL            hash,
-                               ZixHashCode                           code,
-                               ZixKeyMatchFunc ZIX_NONNULL           predicate,
-                               const ZixHashSearchData* ZIX_NULLABLE 
user_data);
+zix_hash_plan_insert_prehashed(
+  const ZixHash* ZIX_NONNULL               hash,
+  ZixHashCode                              code,
+  ZixKeyMatchFunc ZIX_NONNULL              predicate,
+  const ZixHashSearchData* ZIX_UNSPECIFIED user_data);
 
 /**
    Return the record at the given position, or null.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/include/zix/ring.h 
new/zix-v0.8.2/include/zix/ring.h
--- old/zix-v0.8.0/include/zix/ring.h   2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/include/zix/ring.h   2026-06-11 20:52:36.000000000 +0200
@@ -42,9 +42,9 @@
 
    @param allocator Allocator for the ring object and its array.
 
-   @param size Minimum size of the ring in bytes (rounded up to a power of 2).
-
-   Note that one byte of the ring is reserved, so in order to be able to write
+   @param size Minimum size of the ring array in bytes.  This must be between 2
+   and 2147483648 inclusive, and is rounded up to the next power of 2
+   internally.  Note that one byte is reserved, so in order to be able to write
    `n` bytes to the ring at once, `size` must be `n + 1`.
 */
 ZIX_API ZIX_NODISCARD ZixRing* ZIX_ALLOCATED
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/include/zix/sem.h 
new/zix-v0.8.2/include/zix/sem.h
--- old/zix-v0.8.0/include/zix/sem.h    2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/include/zix/sem.h    2026-06-11 20:52:36.000000000 +0200
@@ -112,7 +112,7 @@
    @cond
 */
 
-#if defined(__APPLE__)
+#ifdef __APPLE__
 
 struct ZixSemImpl {
   semaphore_t sem;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/include/zix/string_view.h 
new/zix-v0.8.2/include/zix/string_view.h
--- old/zix-v0.8.0/include/zix/string_view.h    2025-11-12 19:44:25.000000000 
+0100
+++ new/zix-v0.8.2/include/zix/string_view.h    2026-06-11 20:52:36.000000000 
+0200
@@ -8,7 +8,6 @@
 #include <zix/attributes.h>
 
 #include <stdbool.h>
-#include <stddef.h>
 #include <string.h>
 
 ZIX_BEGIN_DECLS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/include/zix/tree.h 
new/zix-v0.8.2/include/zix/tree.h
--- old/zix-v0.8.0/include/zix/tree.h   2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/include/zix/tree.h   2026-06-11 20:52:36.000000000 +0200
@@ -49,7 +49,7 @@
              ZixTreeCompareFunc ZIX_NONNULL  cmp,
              void* ZIX_UNSPECIFIED           cmp_data,
              ZixTreeDestroyFunc ZIX_NULLABLE destroy,
-             const void* ZIX_NULLABLE        destroy_user_data);
+             const void* ZIX_UNSPECIFIED     destroy_user_data);
 
 /// Free `t`
 ZIX_API void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/include/zix/warnings.h 
new/zix-v0.8.2/include/zix/warnings.h
--- old/zix-v0.8.0/include/zix/warnings.h       2025-11-12 19:44:25.000000000 
+0100
+++ new/zix-v0.8.2/include/zix/warnings.h       2026-06-11 20:52:36.000000000 
+0200
@@ -10,7 +10,7 @@
    @{
 */
 
-#if defined(__clang__)
+#ifdef __clang__
 
 #  if __clang_major__ >= 20
 #    define ZIX_DISABLE_EFFECT_WARNINGS \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/meson.build new/zix-v0.8.2/meson.build
--- old/zix-v0.8.0/meson.build  2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/meson.build  2026-06-11 20:52:36.000000000 +0200
@@ -14,7 +14,7 @@
   ],
   license: 'ISC',
   meson_version: '>= 0.56.0',
-  version: '0.8.0',
+  version: '0.8.2',
 )
 
 zix_src_root = meson.current_source_dir()
@@ -40,6 +40,7 @@
       '-Wno-c++98-compat',
       '-Wno-declaration-after-statement',
       '-Wno-implicit-fallthrough', # Really for clang < 12
+      '-Wno-nrvo',
       '-Wno-padded',
       '-Wno-pre-c11-compat',
       '-Wno-pre-c23-compat',
@@ -171,8 +172,52 @@
     'win8': '0x0602',
   }
   system_c_args += [
-    '-DWIN32_LEAN_AND_MEAN',
+    # Set minimum target version
+    '-DWINVER=' + winvers[get_option('win_ver')],
     '-D_WIN32_WINNT=' + winvers[get_option('win_ver')],
+
+    # Disable as many things from windows.h as possible
+    '-DWIN32_LEAN_AND_MEAN',
+    '-DNOGDICAPMASKS', # CC_*, LC_*, PC_*, CP_*, TC_*, RC_
+    '-DNOVIRTUALKEYCODES', # VK_*
+    '-DNOWINMESSAGES', # WM_*, EM_*, LB_*, CB_*
+    '-DNOWINSTYLES', # WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_*
+    '-DNOSYSMETRICS', # SM_*
+    '-DNOMENUS', # MF_*
+    '-DNOICONS', # IDI_*
+    '-DNOKEYSTATES', # MK_*
+    '-DNOSYSCOMMANDS', # SC_*
+    '-DNORASTEROPS', # Binary and Tertiary raster ops
+    '-DNOSHOWWINDOW', # SW_*
+    '-DOEMRESOURCE', # OEM Resource values
+    '-DNOATOM', # Atom Manager routines
+    '-DNOCLIPBOARD', # Clipboard routines
+    '-DNOCOLOR', # Screen colors
+    '-DNOCTLMGR', # Control and Dialog routines
+    '-DNODRAWTEXT', # DrawText() and DT_*
+    '-DNOGDI', # All GDI defines and routines
+    '-DNOKERNEL', # All KERNEL defines and routines
+    '-DNOUSER', # All USER defines and routines
+    # Needed for MultiByteToWideChar/WideCharToMultiByte:
+    # '-DNONLS', # All NLS defines and routines
+    '-DNOMB', # MB_* and MessageBox()
+    '-DNOMEMMGR', # GMEM_*, LMEM_*, GHND, LHND, associated routines
+    '-DNOMETAFILE', # typedef METAFILEPICT
+    '-DNOMINMAX', # Macros min(a,b) and max(a,b)
+    '-DNOMSG', # typedef MSG and associated routines
+    '-DNOOPENFILE', # OpenFile(), OemToAnsi, AnsiToOem, and OF_*
+    '-DNOSCROLL', # SB_* and scrolling routines
+    '-DNOSERVICE', # All Service Controller routines, SERVICE_ equates, etc.
+    '-DNOSOUND', # Sound driver routines
+    '-DNOTEXTMETRIC', # typedef TEXTMETRIC and associated routines
+    '-DNOWH', # SetWindowsHook and WH_*
+    '-DNOWINOFFSETS', # GWL_*, GCL_*, associated routines
+    '-DNOCOMM', # COMM driver routines
+    '-DNOKANJI', # Kanji support stuff
+    '-DNOHELP', # Help engine interface
+    '-DNOPROFILER', # Profiler interface
+    '-DNODEFERWINDOWPOS', # DeferWindowPos routines
+    '-DNOMCX', # Modem Configuration Extensions
   ]
 else
   system_c_args += [
@@ -185,7 +230,7 @@
 platform_c_args = []
 if get_option('checks').disabled()
   # Generic build without platform-specific features
-  platform_c_args += ['-DZIX_NO_DEFAULT_CONFIG']
+  platform_c_args += ['-DZIX_NO_DEFAULT_CONFIG'] + system_c_args
 elif get_option('checks').auto()
   # Statically detect configuration from the build environment
   platform_c_args += system_c_args
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/src/.clang-tidy 
new/zix-v0.8.2/src/.clang-tidy
--- old/zix-v0.8.0/src/.clang-tidy      2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/src/.clang-tidy      2026-06-11 20:52:36.000000000 +0200
@@ -10,5 +10,5 @@
   -misc-no-recursion,
 CheckOptions:
   - key:   readability-function-cognitive-complexity.Threshold
-    value: '85'
+    value: '88'
 InheritParentConfig: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/src/allocator.c 
new/zix-v0.8.2/src/allocator.c
--- old/zix-v0.8.0/src/allocator.c      2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/src/allocator.c      2026-06-11 20:52:36.000000000 +0200
@@ -53,12 +53,14 @@
 {
   (void)allocator;
 
-#if defined(_WIN32)
+#ifdef _WIN32
   return _aligned_malloc(size, alignment);
 #elif USE_POSIX_MEMALIGN
   void* ptr = NULL;
   return posix_memalign(&ptr, alignment, size) ? NULL : ptr;
 #else
+  (void)alignment;
+  (void)size;
   return NULL;
 #endif
 }
@@ -68,7 +70,7 @@
 {
   (void)allocator;
 
-#if defined(_WIN32)
+#ifdef _WIN32
   _aligned_free(ptr);
 #else
   free(ptr);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/src/btree.c new/zix-v0.8.2/src/btree.c
--- old/zix-v0.8.0/src/btree.c  2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/src/btree.c  2026-06-11 20:52:36.000000000 +0200
@@ -24,7 +24,7 @@
 #  define ZIX_BTREE_PAGE_SIZE 4096U
 #endif
 
-#define ZIX_BTREE_NODE_SPACE (ZIX_BTREE_PAGE_SIZE - 2U * sizeof(ZixShort))
+#define ZIX_BTREE_NODE_SPACE (ZIX_BTREE_PAGE_SIZE - (2U * sizeof(ZixShort)))
 #define ZIX_BTREE_LEAF_VALS ((ZIX_BTREE_NODE_SPACE / sizeof(void*)) - 1U)
 #define ZIX_BTREE_INODE_VALS (ZIX_BTREE_LEAF_VALS / 2U)
 
@@ -68,7 +68,7 @@
       (defined(__cplusplus) && __cplusplus >= 201103L))
   assert(sizeof(ZixBTreeNode) <= ZIX_BTREE_PAGE_SIZE);
   assert(sizeof(ZixBTreeNode) >=
-         ZIX_BTREE_PAGE_SIZE - 2U * sizeof(ZixBTreeNode*));
+         ZIX_BTREE_PAGE_SIZE - (2U * sizeof(ZixBTreeNode*)));
 #endif
 
   ZixBTreeNode* const node = (ZixBTreeNode*)zix_aligned_alloc(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/src/digest.c new/zix-v0.8.2/src/digest.c
--- old/zix-v0.8.0/src/digest.c 2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/src/digest.c 2026-06-11 20:52:36.000000000 +0200
@@ -151,7 +151,7 @@
 
     h ^= k;
     h = rotl32(h, 13);
-    h = h * 5U + 0xE6546B64U;
+    h = (h * 5U) + 0xE6546B64U;
   }
 
   // Process any trailing bytes
@@ -198,7 +198,7 @@
 
     h ^= k;
     h = rotl32(h, 13);
-    h = h * 5U + 0xE6546B64U;
+    h = (h * 5U) + 0xE6546B64U;
   }
 
   return mix32(h ^ (uint32_t)len);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/src/errno_status.c 
new/zix-v0.8.2/src/errno_status.c
--- old/zix-v0.8.0/src/errno_status.c   2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/src/errno_status.c   2026-06-11 20:52:36.000000000 +0200
@@ -55,7 +55,7 @@
 {
   // Find the index of the matching mapping (or leave it at the fallback entry)
   size_t m = 0;
-  while (m < N_ERRNO_MAPPINGS && errno_map[m].code != e) {
+  while (m < (N_ERRNO_MAPPINGS - 1) && errno_map[m].code != e) {
     ++m;
   }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/src/path.c new/zix-v0.8.2/src/path.c
--- old/zix-v0.8.0/src/path.c   2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/src/path.c   2026-06-11 20:52:36.000000000 +0200
@@ -12,7 +12,6 @@
 #include <zix/string_view.h>
 
 #include <stdbool.h>
-#include <stddef.h>
 #include <string.h>
 
 static ZIX_CONSTEXPR ZixIndexRange two_range = {0U, 2U};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/src/posix/filesystem_posix.c 
new/zix-v0.8.2/src/posix/filesystem_posix.c
--- old/zix-v0.8.0/src/posix/filesystem_posix.c 2025-11-12 19:44:25.000000000 
+0100
+++ new/zix-v0.8.2/src/posix/filesystem_posix.c 2026-06-11 20:52:36.000000000 
+0200
@@ -419,7 +419,7 @@
 char*
 zix_current_path(ZixAllocator* const allocator)
 {
-#if defined(PATH_MAX)
+#ifdef PATH_MAX
   // Some POSIX systems have a static PATH_MAX so we can store it on the stack
   char        buffer[PATH_MAX] = {0};
   char* const cwd              = getcwd(buffer, PATH_MAX);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/src/posix/system_posix.c 
new/zix-v0.8.2/src/posix/system_posix.c
--- old/zix-v0.8.0/src/posix/system_posix.c     2025-11-12 19:44:25.000000000 
+0100
+++ new/zix-v0.8.2/src/posix/system_posix.c     2026-06-11 20:52:36.000000000 
+0200
@@ -15,7 +15,7 @@
 #  define MAX(a, b) (((a) > (b)) ? (a) : (b))
 #endif
 
-#if defined(PAGE_SIZE)
+#ifdef PAGE_SIZE
 #  define ZIX_DEFAULT_PAGE_SIZE PAGE_SIZE
 #else
 #  define ZIX_DEFAULT_PAGE_SIZE 4096U
@@ -45,7 +45,7 @@
 int
 zix_system_open(const char* const path, const int flags, const mode_t mode)
 {
-#if defined(O_CLOEXEC)
+#ifdef O_CLOEXEC
   return open(path, flags | O_CLOEXEC, mode); // NOLINT(hicpp-signed-bitwise)
 #else
   return open(path, flags, mode);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/src/ring.c new/zix-v0.8.2/src/ring.c
--- old/zix-v0.8.0/src/ring.c   2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/src/ring.c   2026-06-11 20:52:36.000000000 +0200
@@ -21,12 +21,11 @@
   stdatomic.h support arrives before anyone cares about running this code on
   Windows on ARM.
 */
-#if defined(_MSC_VER)
+#ifdef _MSC_VER
 #  include <intrin.h>
 #endif
 
 #include <stdint.h>
-#include <stdlib.h>
 #include <string.h>
 
 struct ZixRingImpl {
@@ -41,7 +40,7 @@
 static inline uint32_t
 zix_atomic_load(const uint32_t* const ptr)
 {
-#if defined(_MSC_VER)
+#ifdef _MSC_VER
   const uint32_t val = *ptr;
   _ReadBarrier();
   return val;
@@ -54,7 +53,7 @@
 zix_atomic_store(uint32_t* const ptr, // 
NOLINT(readability-non-const-parameter)
                  const uint32_t  val)
 {
-#if defined(_MSC_VER)
+#ifdef _MSC_VER
   _WriteBarrier();
   *ptr = val;
 #else
@@ -79,6 +78,10 @@
 ZixRing*
 zix_ring_new(ZixAllocator* const allocator, const uint32_t size)
 {
+  if (size < 2U || size > 2147483648U) {
+    return NULL;
+  }
+
   ZixRing* ring = (ZixRing*)zix_malloc(allocator, sizeof(ZixRing));
 
   if (ring) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/src/tree.c new/zix-v0.8.2/src/tree.c
--- old/zix-v0.8.0/src/tree.c   2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/src/tree.c   2026-06-11 20:52:36.000000000 +0200
@@ -558,7 +558,7 @@
   }
 
   *ti = n;
-  return (n) ? ZIX_STATUS_SUCCESS : ZIX_STATUS_NOT_FOUND;
+  return n ? ZIX_STATUS_SUCCESS : ZIX_STATUS_NOT_FOUND;
 }
 
 ZIX_REALTIME void*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/src/zix_config.h 
new/zix-v0.8.2/src/zix_config.h
--- old/zix-v0.8.0/src/zix_config.h     2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/src/zix_config.h     2026-06-11 20:52:36.000000000 +0200
@@ -35,7 +35,7 @@
 #ifndef ZIX_CONFIG_H
 #define ZIX_CONFIG_H
 
-#if !defined(ZIX_NO_DEFAULT_CONFIG)
+#ifndef ZIX_NO_DEFAULT_CONFIG
 
 // We need unistd.h to check _POSIX_VERSION
 #  ifndef ZIX_NO_POSIX
@@ -49,7 +49,7 @@
 #  endif
 
 // Define ZIX_POSIX_VERSION unconditionally for convenience
-#  if defined(_POSIX_VERSION)
+#  ifdef _POSIX_VERSION
 #    define ZIX_POSIX_VERSION _POSIX_VERSION
 #  else
 #    define ZIX_POSIX_VERSION 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/test/cpp/.clang-tidy 
new/zix-v0.8.2/test/cpp/.clang-tidy
--- old/zix-v0.8.0/test/cpp/.clang-tidy 2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/test/cpp/.clang-tidy 2026-06-11 20:52:36.000000000 +0200
@@ -8,7 +8,9 @@
   -bugprone-exception-escape,
   -cppcoreguidelines-macro-usage,
   -cppcoreguidelines-owning-memory,
+  -cppcoreguidelines-use-enum-class,
   -fuchsia-default-arguments-calls,
+  -llvm-prefer-static-over-anonymous-namespace,
   -modernize-raw-string-literal,
   -modernize-redundant-void-arg,
   -modernize-use-trailing-return-type,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/test/cpp/test_headers_cpp.cpp 
new/zix-v0.8.2/test/cpp/test_headers_cpp.cpp
--- old/zix-v0.8.0/test/cpp/test_headers_cpp.cpp        2025-11-12 
19:44:25.000000000 +0100
+++ new/zix-v0.8.2/test/cpp/test_headers_cpp.cpp        2026-06-11 
20:52:36.000000000 +0200
@@ -22,7 +22,7 @@
 #include <zix/tree.h>           // IWYU pragma: keep
 #include <zix/zix.h>            // IWYU pragma: keep
 
-#if defined(__GNUC__)
+#ifdef __GNUC__
 __attribute__((const))
 #endif
 int
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/test/cpp/test_path_std.cpp 
new/zix-v0.8.2/test/cpp/test_path_std.cpp
--- old/zix-v0.8.0/test/cpp/test_path_std.cpp   2025-11-12 19:44:25.000000000 
+0100
+++ new/zix-v0.8.2/test/cpp/test_path_std.cpp   2026-06-11 20:52:36.000000000 
+0200
@@ -333,7 +333,7 @@
   "C:a/c:/b",
   "C:a/c:\\b",
 
-#if !defined(_WIN32)
+#ifndef _WIN32
   // Filenames with colons that aren't handled consistently on Windows
   "C:/a/C:b",
   "C:/a/D:b",
@@ -349,7 +349,7 @@
   "nodrive:",
 #endif
 
-#if !defined(_WIN32)
+#ifndef _WIN32
   // Invalid root and network paths that aren't handled consistently on Windows
   "//a//",
   "//host/dir/../../../a",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/test/headers/test_headers.c 
new/zix-v0.8.2/test/headers/test_headers.c
--- old/zix-v0.8.0/test/headers/test_headers.c  2025-11-12 19:44:25.000000000 
+0100
+++ new/zix-v0.8.2/test/headers/test_headers.c  2026-06-11 20:52:36.000000000 
+0200
@@ -18,7 +18,7 @@
 #include <zix/tree.h>           // IWYU pragma: keep
 #include <zix/zix.h>            // IWYU pragma: keep
 
-#if defined(__GNUC__)
+#ifdef __GNUC__
 __attribute__((const))
 #endif
 int
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/test/test_hash.c 
new/zix-v0.8.2/test/test_hash.c
--- old/zix-v0.8.0/test/test_hash.c     2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/test/test_hash.c     2026-06-11 20:52:36.000000000 +0200
@@ -20,7 +20,6 @@
 #include <inttypes.h>
 #include <stdarg.h>
 #include <stdbool.h>
-#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -142,7 +141,7 @@
 
   uint32_t seed = 1U;
   for (size_t i = 0U; i < n_elems; ++i) {
-    strings[i] = buffer + i * (string_length + 1);
+    strings[i] = buffer + (i * (string_length + 1));
     assert((uintptr_t)strings[i] % sizeof(size_t) == 0);
     assert((uintptr_t)strings[i] % sizeof(uint32_t) == 0);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zix-v0.8.0/test/test_ring.c 
new/zix-v0.8.2/test/test_ring.c
--- old/zix-v0.8.0/test/test_ring.c     2025-11-12 19:44:25.000000000 +0100
+++ new/zix-v0.8.2/test/test_ring.c     2026-06-11 20:52:36.000000000 +0200
@@ -160,6 +160,27 @@
 }
 
 static void
+test_capacity(void)
+{
+  assert(!zix_ring_new(NULL, 0));
+  assert(!zix_ring_new(NULL, 1));
+  assert(!zix_ring_new(NULL, 2147483649U));
+
+  {
+    ZixRing* const smallest = zix_ring_new(NULL, 2U);
+    assert(smallest);
+    assert(zix_ring_capacity(smallest) == 1U);
+    zix_ring_free(smallest);
+  }
+  {
+    ZixRing* const rounded = zix_ring_new(NULL, 6U);
+    assert(rounded);
+    assert(zix_ring_capacity(rounded) == 7U);
+    zix_ring_free(rounded);
+  }
+}
+
+static void
 test_failed_alloc(void)
 {
   ZixFailingAllocator allocator = zix_failing_allocator();
@@ -192,6 +213,7 @@
   n_writes = (argc > 2) ? (unsigned)zix_test_size_arg(argv[2], 4U, 1U << 20U)
                         : size * 1024;
 
+  test_capacity();
   test_failed_alloc();
   test_ring(size);
   return 0;

Reply via email to