From: Frode Solheim Date: Tue, 15 Jul 2025 22:35:50 +0000 (+0200) Subject: Compilation fixes for debugmem.cpp and memory.cpp X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=eb7c1f9cbc19631d7ada98c3cf30b5ab135a4daa;p=francis%2Fwinuae.git Compilation fixes for debugmem.cpp and memory.cpp --- diff --git a/debugmem.cpp b/debugmem.cpp index a7f5d7e1..1d51f846 100644 --- a/debugmem.cpp +++ b/debugmem.cpp @@ -825,7 +825,7 @@ static uae_u32 REGPARAM2 debugmem_chipmem_bget(uaecptr addr) return v; } -void REGPARAM2 debugmem_chipmem_lput(uaecptr addr, uae_u32 l) +static void REGPARAM2 debugmem_chipmem_lput(uaecptr addr, uae_u32 l) { if (addr < debugmem_chiplimit) { debugmem_chiphit(addr, l, 4); @@ -837,7 +837,7 @@ void REGPARAM2 debugmem_chipmem_lput(uaecptr addr, uae_u32 l) } } -void REGPARAM2 debugmem_chipmem_wput(uaecptr addr, uae_u32 w) +static void REGPARAM2 debugmem_chipmem_wput(uaecptr addr, uae_u32 w) { if (addr < debugmem_chiplimit) { debugmem_chiphit(addr, w, 2); @@ -849,7 +849,7 @@ void REGPARAM2 debugmem_chipmem_wput(uaecptr addr, uae_u32 w) } } -void REGPARAM2 debugmem_chipmem_bput(uaecptr addr, uae_u32 b) +static void REGPARAM2 debugmem_chipmem_bput(uaecptr addr, uae_u32 b) { if (addr < debugmem_chiplimit) { debugmem_chiphit(addr, b, 1); diff --git a/include/debugmem.h b/include/debugmem.h index c8aec21e..c22af9b0 100644 --- a/include/debugmem.h +++ b/include/debugmem.h @@ -31,3 +31,5 @@ void debugmem_flushcache(uaecptr, int); extern uae_u32 debugmem_chiplimit; extern uae_u32 debugmem_chiphit(uaecptr addr, uae_u32 v, int size); extern bool debugmem_extinvalidmem(uaecptr addr, uae_u32 v, int size); + +struct zfile *read_executable_rom(struct zfile*, int size, int blocks); diff --git a/memory.cpp b/memory.cpp index 862a6dcf..18c69017 100644 --- a/memory.cpp +++ b/memory.cpp @@ -684,7 +684,7 @@ static uae_u32 REGPARAM2 chipmem_bget_limit(uaecptr addr) return v; } -void REGPARAM2 chipmem_lput_limit(uaecptr addr, uae_u32 l) +static void REGPARAM2 chipmem_lput_limit(uaecptr addr, uae_u32 l) { uae_u32 *m; @@ -696,7 +696,7 @@ void REGPARAM2 chipmem_lput_limit(uaecptr addr, uae_u32 l) do_put_mem_long(m, l); } -void REGPARAM2 chipmem_wput_limit(uaecptr addr, uae_u32 w) +static void REGPARAM2 chipmem_wput_limit(uaecptr addr, uae_u32 w) { uae_u16 *m; @@ -708,7 +708,7 @@ void REGPARAM2 chipmem_wput_limit(uaecptr addr, uae_u32 w) do_put_mem_word(m, w); } -void REGPARAM2 chipmem_bput_limit(uaecptr addr, uae_u32 b) +static void REGPARAM2 chipmem_bput_limit(uaecptr addr, uae_u32 b) { addr &= chipmem_bank.mask; if (addr >= 0x180000) { @@ -2032,7 +2032,6 @@ static struct zfile *get_kickstart_filehandle(struct uae_prefs *p) return f; } -extern struct zfile *read_executable_rom(struct zfile*, int size, int blocks); static const uae_u8 romend[20] = { 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1f @@ -3502,7 +3501,8 @@ static uae_u32 REGPARAM2 threadcpu_wget(uaecptr addr) return v; } -uae_u32 REGPARAM2 threadcpu_bget(uaecptr addr) + +static uae_u32 REGPARAM2 threadcpu_bget(uaecptr addr) { uae_u32 v = process_cpu_indirect_memory_read(addr, 0); @@ -3528,7 +3528,7 @@ static addrbank *get_bank_cpu_thread(addrbank *bank) at = xcalloc(addrbank_thread, 1); thread_banks[thread_banks_used++] = at; at->orig = bank; - memcpy(&at->ab, bank, sizeof addrbank); + memcpy(&at->ab, bank, sizeof(addrbank)); addrbank *tb = &at->ab; tb->jit_read_flag = S_READ; tb->jit_write_flag = S_WRITE;