diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2023-11-01 20:07:38 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-02 10:07:38 +1100 |
| commit | f276d2b0e618f7fc95a35b629161561489203f39 (patch) | |
| tree | bde1366107e427c1b6b5cf32db2eb7912a0d7bb0 /src/code/TwoHeadArena.c | |
| parent | 42e1c438e1e78e3a298c71734cb7e699a990c94c (diff) | |
Enable `-Wint-conversion` warning (#1266)
* fixing some warnings
* more pointer fixing
* Use `-Wno-int-conversion` on audio files
* more progress
* fix
* more pointer fixes
* kinda progress
* Fix remaining casts
* Format
* fix merge
* fix warnings
* fix parameter
* use SEGMENT_ROM_START_OFFSET a bit more
* format
* fix audio warnings
* some more fixes
* fix en_go
* review
* review
* whoops, missing cast
* review
* review
* ->data
* format
* review
* fix
* asPtr
* fix
* Update src/code/sched.c
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
* review
* fix in EnDnh
* improve format
* engo
* format
* fix
* format
* Update include/z64.h
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
* TexturePtr
* fix warnings
* fix warnings
* format
* fix
* review
---------
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Diffstat (limited to 'src/code/TwoHeadArena.c')
| -rw-r--r-- | src/code/TwoHeadArena.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/code/TwoHeadArena.c b/src/code/TwoHeadArena.c index a476c3d74..c6a802e04 100644 --- a/src/code/TwoHeadArena.c +++ b/src/code/TwoHeadArena.c @@ -32,7 +32,7 @@ void* THA_GetTail(TwoHeadArena* tha) { void* THA_AllocHead(TwoHeadArena* tha, size_t size) { void* start = tha->head; - tha->head = (u8*)tha->head + size; + tha->head = (void*)((uintptr_t)tha->head + size); return start; } @@ -102,8 +102,8 @@ void* THA_AllocTailAlign(TwoHeadArena* tha, size_t size, uintptr_t mask) { * * @return Remaining size. A negative number indicates an overflow. */ -s32 THA_GetRemaining(TwoHeadArena* tha) { - return (s32)((u8*)tha->tail - (u8*)tha->head); +ptrdiff_t THA_GetRemaining(TwoHeadArena* tha) { + return (uintptr_t)tha->tail - (uintptr_t)tha->head; } /** @@ -115,7 +115,7 @@ u32 THA_IsCrash(TwoHeadArena* tha) { void THA_Reset(TwoHeadArena* tha) { tha->head = tha->start; - tha->tail = (u8*)tha->start + tha->size; + tha->tail = (void*)((uintptr_t)tha->start + tha->size); } /** |
