# HG changeset patch # User John Tsiombikas # Date 1297836079 -7200 # Node ID af6f4adc43d65f429b8a9119a6c161de60476796 # Parent 78d5c304ddd075368204e1eb1328cf466548d976 fixed a bug in strrchr and some warnings diff -r 78d5c304ddd0 -r af6f4adc43d6 src/klibc/string.c --- a/src/klibc/string.c Wed Feb 16 07:50:25 2011 +0200 +++ b/src/klibc/string.c Wed Feb 16 08:01:19 2011 +0200 @@ -66,7 +66,7 @@ { while(*s) { if(*s == c) { - return s; + return (char*)s; } s++; } @@ -75,15 +75,15 @@ char *strrchr(const char *s, int c) { - char *ptr = s; + const char *ptr = s; /* find the end */ while(*ptr) ptr++; /* go back checking for c */ - while(*--ptr >= s) { + while(--ptr >= s) { if(*ptr == c) { - return ptr; + return (char*)ptr; } } return 0; diff -r 78d5c304ddd0 -r af6f4adc43d6 src/mboot.S --- a/src/mboot.S Wed Feb 16 07:50:25 2011 +0200 +++ b/src/mboot.S Wed Feb 16 08:01:19 2011 +0200 @@ -9,7 +9,7 @@ .long MAGIC .long FLAGS .long -(MAGIC + FLAGS) /* checksum */ - .fill 5, 4 /* fill out the rest with zeroes */ + .fill 5, 4, 0 /* fill out the rest with zeroes */ .globl kentry kentry: