From 57cbacda155c3f0782618a085660f1f3e0f2f806 Mon Sep 17 00:00:00 2001 From: ToyB-Chan Date: Wed, 10 Jun 2026 07:59:16 +0200 Subject: [PATCH] fixed warnings --- minimal_heap.h | 6 +++--- minimal_heap_implementation.inl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/minimal_heap.h b/minimal_heap.h index 3d2dd0e..71697cb 100644 --- a/minimal_heap.h +++ b/minimal_heap.h @@ -53,10 +53,10 @@ typedef struct _MIHP_HeapConfig size_t MaxMemoryAreaSize; // Must be a multiple of AllocationAlignment size_t MinTotalTraversalsBeforeHeapExpansion; // Minimal amounts of traversals during allocation before considering expanding the heap - char MinHeapTraversalPercentToExpand; // Minimal integer percent of the heap traversed before expanding the heap + uint8_t MinHeapTraversalPercentToExpand; // Minimal integer percent of the heap traversed before expanding the heap size_t AllocationAlignment; // Must be power of two and at least sizeof(size_t) - char AllocationInitialValue; // Initial value the returned blocks are to be filled with + uint8_t AllocationInitialValue; // Initial value the returned blocks are to be filled with MIHP_HeapValidationMode HeapValidationMode; @@ -101,7 +101,7 @@ typedef struct _MIHP_HeapSegmentHeader struct _MIHP_HeapSegmentHeader* PreviousSegment; struct _MIHP_HeapMemoryAreaHeader* OwningMemoryArea; - char _padding0[16]; + uint8_t _padding0[16]; uint32_t Checksum; // Checksum must be the last member ! diff --git a/minimal_heap_implementation.inl b/minimal_heap_implementation.inl index ba5873f..7327852 100644 --- a/minimal_heap_implementation.inl +++ b/minimal_heap_implementation.inl @@ -8,7 +8,7 @@ MIHP_HeapConfig MIHP_MakeDefaultConfigPreset() MIHP_HeapConfig cfg = { 0 }; cfg.MinMemoryAreaSize = 4096 * 32; - cfg.MaxMemoryAreaSize = 4096 * 4096 * 128; + cfg.MaxMemoryAreaSize = 4096 * 4096 * 128ull; cfg.MinTotalTraversalsBeforeHeapExpansion = 10'000; cfg.MinHeapTraversalPercentToExpand = 80;