Should not affect behaviour as it just calls ofmem_malloc which takes size_t as argument anyway. Reported when build with -Wbuiltin-declaration-mismatch.
Signed-off-by: Amadeusz Sławiński amade@asmblr.net --- arch/amd64/lib.c | 2 +- arch/ppc/ofmem.c | 2 +- arch/ppc/qemu/ofmem.c | 2 +- arch/sparc32/lib.c | 2 +- arch/sparc64/lib.c | 2 +- arch/x86/lib.c | 2 +- include/libc/stdlib.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/amd64/lib.c b/arch/amd64/lib.c index f04458e..9efbe68 100644 --- a/arch/amd64/lib.c +++ b/arch/amd64/lib.c @@ -39,7 +39,7 @@ static char memory[MEMSIZE]; static void *memptr=memory; static int memsize=MEMSIZE;
-void *malloc(int size) +void *malloc(size_t size) { void *ret=(void *)0; if(memsize>=size) { diff --git a/arch/ppc/ofmem.c b/arch/ppc/ofmem.c index c9b066e..5da641b 100644 --- a/arch/ppc/ofmem.c +++ b/arch/ppc/ofmem.c @@ -131,7 +131,7 @@ void ofmem_arch_map_pages(ucell phys, ucell virt, ucell size, ucell mode) /************************************************************************/
void * -malloc( int size ) +malloc( size_t size ) { return ofmem_malloc(size); } diff --git a/arch/ppc/qemu/ofmem.c b/arch/ppc/qemu/ofmem.c index 4ff0803..3a21d25 100644 --- a/arch/ppc/qemu/ofmem.c +++ b/arch/ppc/qemu/ofmem.c @@ -233,7 +233,7 @@ pa2va(phys_addr_t pa) }
void * -malloc(int size) +malloc(size_t size) { return ofmem_malloc(size); } diff --git a/arch/sparc32/lib.c b/arch/sparc32/lib.c index 727929c..ad27c7c 100644 --- a/arch/sparc32/lib.c +++ b/arch/sparc32/lib.c @@ -85,7 +85,7 @@ pa2va(phys_addr_t pa) }
void * -malloc(int size) +malloc(size_t size) { return ofmem_malloc(size); } diff --git a/arch/sparc64/lib.c b/arch/sparc64/lib.c index e9fff28..1a5c9f1 100644 --- a/arch/sparc64/lib.c +++ b/arch/sparc64/lib.c @@ -55,7 +55,7 @@ pa2va(phys_addr_t pa) return pa; }
-void *malloc(int size) +void *malloc(size_t size) { return ofmem_malloc(size); } diff --git a/arch/x86/lib.c b/arch/x86/lib.c index eeb901b..6618e5c 100644 --- a/arch/x86/lib.c +++ b/arch/x86/lib.c @@ -39,7 +39,7 @@ static char memory[MEMSIZE]; static void *memptr=memory; static int memsize=MEMSIZE;
-void *malloc(int size) +void *malloc(size_t size) { void *ret=(void *)0; if(memsize>=size) { diff --git a/include/libc/stdlib.h b/include/libc/stdlib.h index ef08838..3784eb4 100644 --- a/include/libc/stdlib.h +++ b/include/libc/stdlib.h @@ -16,7 +16,7 @@ #ifndef _H_STDLIB #define _H_STDLIB
-extern void *malloc( int size ); +extern void *malloc( size_t size ); extern void free( void *ptr ); extern void *realloc( void *ptr, size_t size );