Test init reservation failure
All checks were successful
libakerror CI Build / cmake_build (push) Successful in 2m52s
libakerror CI Build / coverage (push) Successful in 2m53s
libakerror CI Build / mutation_test (push) Successful in 46m33s

This commit is contained in:
2026-08-03 13:11:01 -04:00
committed by Logikoma
parent fdb8ffaad0
commit e2d31ad757
3 changed files with 65 additions and 2 deletions

View File

@@ -88,7 +88,10 @@ typedef struct
static akerr_StatusName akerr_status_names[AKERR_STATUS_NAME_SLOTS];
static int akerr_status_name_count;
static akerr_StatusRange akerr_status_ranges[AKERR_MAX_RESERVED_STATUS_RANGES];
/* C has no portable zero-length arrays. Keep one unused physical slot when a
* test build sets the logical capacity to zero to drive init's fatal path. */
static akerr_StatusRange akerr_status_ranges[
AKERR_MAX_RESERVED_STATUS_RANGES > 0 ? AKERR_MAX_RESERVED_STATUS_RANGES : 1];
static int akerr_status_range_count;
akerr_ErrorContext AKERR_ARRAY_ERROR[AKERR_MAX_ARRAY_ERROR];