hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit e02a0a89745f49a8512f21a4de554e728e0facbb
parent bd3595c9b713b7a1ece492705a6ed8ad71028bea
Author: Ember Sawady <ecs@d2evs.net>
Date:   Wed, 10 May 2023 18:25:07 +0000

Remove implicit assignment from uintptr to pointer

Signed-off-by: Ember Sawady <ecs@d2evs.net>

Diffstat:
Mlinux/vdso/vdso.ha | 7++++---
Munix/signal/+linux.ha | 4++--
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/linux/vdso/vdso.ha b/linux/vdso/vdso.ha @@ -58,11 +58,12 @@ fn get_vdso_ctx() nullable *vdso_ctx = { const ph = phui: *elf::phdr64; switch (ph.p_type) { case elf::pt::LOAD => - baseseg = ehui + + baseseg = (ehui + ph.p_offset: uintptr - - ph.p_vaddr: uintptr; + ph.p_vaddr: uintptr): nullable *void; case elf::pt::DYNAMIC => - dynvec = ehui + ph.p_offset: uintptr; + dynvec = (ehui + + ph.p_offset: uintptr): *[*]format::elf::dyn64; case => void; }; phui += eh.e_phentsize: uintptr; diff --git a/unix/signal/+linux.ha b/unix/signal/+linux.ha @@ -63,7 +63,7 @@ export fn restore(signum: signal, action: *sigaction) void = { // Unregisters signal handlers for the specified signal. export fn reset(signum: signal) void = { - handle(signum, rt::SIG_DFL); + handle(signum, rt::SIG_DFL: *handler); }; // Unregisters all signal handlers. @@ -103,7 +103,7 @@ export fn resetall() void = { // Prevents given signal from arriving to the current process. // One common use case is to ignore SIGCHLD to avoid zombie child processes. export fn ignore(signum: signal) void = { - handle(signum, rt::SIG_IGN); + handle(signum, rt::SIG_IGN: *handler); }; // Adds the given list of signals to the process's current signal mask,