* Kompilieren mit -Wstrict-prototypes und ensprechende Korrekturen -- Antoine Kaufmann <toni@xxxxxxxxxxxxxxxx>
Index: trunk/src/include/stdlib.h =================================================================== --- trunk.orig/src/include/stdlib.h +++ trunk/src/include/stdlib.h @@ -118,6 +118,6 @@ void srand(unsigned int seed); * * @return Zufallszahl */ -int rand(); +int rand(void); #endif Index: trunk/src/include/string.h =================================================================== --- trunk.orig/src/include/string.h +++ trunk/src/include/string.h @@ -3,14 +3,17 @@ #include <stddef.h> void* memcpy(void* dest, const void* src, size_t num); +void* memccpy(void* dest, const void* src, int c, size_t num); void* memmove(void* dest, const void* src, size_t num); void* memset(void* addr, int value, size_t len); void* memchr(const void* s, unsigned char c, size_t n); +void* memmem(const void* find, size_t f_len, const void* mem, size_t m_len); int memcmp(const void* s1, const void* s2, size_t n); char* strcpy(char* dest, const char* src); char* strncpy(char* dest, const char* src, size_t n); +size_t strlcpy(char* dest, const char* src, size_t n); int strcmp(const char* s1, const char* s2); int strncmp(const char* s1, const char* s2, size_t n); @@ -19,11 +22,17 @@ size_t strlen(const char* s); size_t strnlen(const char* s, size_t maxlen); char* strstr(const char* s1, const char* s2); +char* strnstr(const char* s1, const char* s2, size_t s1_len); +char* strcasestr(const char* s1, const char* s2); + char* strchr(const char* str, int character); char* strrchr(const char* str, int character); char* strcat(char* dest, const char* src); char* strncat(char* dest, const char* src, size_t n); +size_t strlcat(char* dest, const char* src, size_t n); + +char* strsep(char** strp, const char* delim); char* strtok(char* str, const char* delim); Index: trunk/src/lib/stdlibc/liballoc.c =================================================================== --- trunk.orig/src/lib/stdlibc/liballoc.c +++ trunk/src/lib/stdlibc/liballoc.c @@ -8,8 +8,8 @@ #define PREFIX(func) func extern void* mem_allocate(dword size, dword flags); -extern void p(); -extern void v(); +extern void p(void); +extern void v(void); extern void mem_free(void* address, dword size); /** Durand's Amazing Super Duper Memory functions. */ @@ -111,14 +111,14 @@ static long long l_possibleOverruns = 0; /* OS-spezifische Funktionen */ static lock_t la_lock = 0; -static int liballoc_lock() +static int liballoc_lock(void) { //lock(&la_lock); p(); return 0; } -static int liballoc_unlock() +static int liballoc_unlock(void) { //unlock(&la_lock); v(); @@ -148,7 +148,7 @@ static void liballoc_free( void* ptr, in } -void init_memory_manager() { +void init_memory_manager(void) { // TODO: Entfernen } Index: trunk/src/modules/include/env.h =================================================================== --- trunk.orig/src/modules/include/env.h +++ trunk/src/modules/include/env.h @@ -39,11 +39,11 @@ #include <stddef.h> #include <stdint.h> -void init_envvars(); +void init_envvars(void); char* getenv(const char* name); char* getenv_index(int index); char* getenv_name_by_index(int index); -int getenv_count(); +int getenv_count(void); int setenv(const char* name, const char* value, int overwrite); void unsetenv(const char* name); Index: trunk/src/modules/include/lostio.h =================================================================== --- trunk.orig/src/modules/include/lostio.h +++ trunk/src/modules/include/lostio.h @@ -126,10 +126,10 @@ typedef struct ///LostIO-Schnittstelle initialisieren -void lostio_init(); +void lostio_init(void); ///LostIO-Interne vorgaenge abarbeiten -void lostio_dispatch(); +void lostio_dispatch(void); ///Typehandle in die Liste einfuegen void lostio_register_typehandle(typehandle_t* typehandle); @@ -169,13 +169,13 @@ vfstree_node_t* vfstree_get_node_by_path ///Den Ramfile-Typ benutzbar machen -void lostio_type_ramfile_use(); +void lostio_type_ramfile_use(void); ///Den Ramfile-Typ unter einer bestimmten ID benutzbar machen void lostio_type_ramfile_use_as(typeid_t id); ///Den Verzechnis-Typ benutzbar machen -void lostio_type_directory_use(); +void lostio_type_directory_use(void); ///Den Verzechnis-Typ unter einer bestimmten ID benutzbar machen void lostio_type_directory_use_as(typeid_t id); Index: trunk/src/modules/include/rpc.h =================================================================== --- trunk.orig/src/modules/include/rpc.h +++ trunk/src/modules/include/rpc.h @@ -27,9 +27,9 @@ typedef struct { extern handler_function_t rpc_response_handler; -void init_messaging(); +void init_messaging(void); bool register_message_handler(char* fnname, handler_function_t handler); -void register_intr_handler(byte intr, void (*handler)()); +void register_intr_handler(byte intr, void (*handler)(void)); dword rpc_get_dword(pid_t pid, char* function_name, size_t data_length, char* data); int rpc_get_int(pid_t pid, char* function_name, size_t data_length, char* data); @@ -41,7 +41,7 @@ void rpc_send_dword_response(pid_t pid, void rpc_send_int_response(pid_t pid, dword correlation_id, int response); void rpc_send_string_response(pid_t pid, dword correlation_id, char* response); -dword timer_register(void (*callback)(), dword usec); +dword timer_register(void (*callback)(void), dword usec); void timer_cancel(dword timer_id); #endif Index: trunk/src/modules/include/syscall.h =================================================================== --- trunk.orig/src/modules/include/syscall.h +++ trunk/src/modules/include/syscall.h @@ -25,7 +25,7 @@ void *mem_allocate_physical(dword size, dma_mem_ptr_t mem_dma_allocate(dword size, dword flags); bool mem_free(void* address, dword size); void mem_free_physical(void* address, dword size); -memory_info_t memory_info(); +memory_info_t memory_info(void); void* get_phys_addr(void* address); dword create_shared_memory(dword size); @@ -35,33 +35,33 @@ void close_shared_memory(dword id); bool request_ports(dword port, dword length); bool release_ports(dword port, dword length); -void yield(); -void wait_for_rpc(); -void p(); -void v(); +void yield(void); +void wait_for_rpc(void); +void p(void); +void v(void); -void set_rpc_handler(void (*rpc_handler)()); +void set_rpc_handler(void (*rpc_handler)(void)); void add_intr_handler(dword intr); void rpc(pid_t pid); void send_message(pid_t pid, dword function, dword correlation_id, dword len, char* data); -void wait_for_rpc(); -void v_and_wait_for_rpc(); +void wait_for_rpc(void); +void v_and_wait_for_rpc(void); -pid_t get_pid(); +pid_t get_pid(void); pid_t get_parent_pid(pid_t pid); pid_t create_process(dword initial_eip, uid_t uid, const char* path, pid_t parent_pid); -void destroy_process(); +void destroy_process(void); void init_child_page (pid_t pid, void* dest, void* src, size_t size); void init_child_page_copy (pid_t pid, void* dest, void* src, size_t size); void unblock_process(pid_t pid); -char* get_cmdline(); +char* get_cmdline(void); bool vm86_int(vm86_regs_t *regs, dword *shm); -task_info_t* enumerate_tasks(); +task_info_t* enumerate_tasks(void); -qword get_tick_count(); +qword get_tick_count(void); void syscall_timer(dword timer_id, dword usec); Index: trunk/src/modules/lib/crt0.c =================================================================== --- trunk.orig/src/modules/lib/crt0.c +++ trunk/src/modules/lib/crt0.c @@ -41,12 +41,12 @@ //Sollte anders geloest werden extern int main(int argc, char* argv[]); -extern void init_sync_messages(); -extern void init_envvars(); -extern void init_waitpid(); -extern void stdio_init(); +extern void init_sync_messages(void); +extern void init_envvars(void); +extern void init_waitpid(void); +extern void stdio_init(void); -void __attribute__((weak)) _start() +void __attribute__((weak)) _start(void) { //v(); init_memory_manager(); Index: trunk/src/modules/lib/envvars.c =================================================================== --- trunk.orig/src/modules/lib/envvars.c +++ trunk/src/modules/lib/envvars.c @@ -40,6 +40,7 @@ #include "collections.h" #include <io.h> #include <errno.h> +#include <env.h> typedef struct { char* name; Index: trunk/src/modules/lib/lostio/include/lostio_internal.h =================================================================== --- trunk.orig/src/modules/lib/lostio/include/lostio_internal.h +++ trunk/src/modules/lib/lostio/include/lostio_internal.h @@ -88,7 +88,7 @@ void rpc_io_unlink(pid_t pid, dword c lostio_filehandle_t* get_filehandle(pid_t pid, dword id); ///Verarbeiten von Anfragen fuer synchrones Lesen -void lostio_sync_dispatch(); +void lostio_sync_dispatch(void); /*! @} */ Index: trunk/src/modules/lib/msleep.c =================================================================== --- trunk.orig/src/modules/lib/msleep.c +++ trunk/src/modules/lib/msleep.c @@ -47,7 +47,7 @@ void msleep(unsigned long msec) } } -static void do_nothing() {} +static void do_nothing(void) {} unsigned int sleep(unsigned int sec) { Index: trunk/src/modules/lib/posix/getopt.c =================================================================== --- trunk.orig/src/modules/lib/posix/getopt.c +++ trunk/src/modules/lib/posix/getopt.c @@ -40,6 +40,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <getopt.h> //#include "un-namespace.h" //#include "libc_private.h" Index: trunk/src/modules/lib/posix/posix_files.c =================================================================== --- trunk.orig/src/modules/lib/posix/posix_files.c +++ trunk/src/modules/lib/posix/posix_files.c @@ -57,7 +57,7 @@ static int next_fd = 0; /** * Posix-Dateiemulation initialisieren */ -static void posix_files_init() +static void posix_files_init(void) { if (fd_list) { return; Index: trunk/src/modules/lib/posix/signal.c =================================================================== --- trunk.orig/src/modules/lib/posix/signal.c +++ trunk/src/modules/lib/posix/signal.c @@ -50,7 +50,7 @@ static bool initialized = FALSE; /** * Signale initialisieren */ -static void init_signals() +static void init_signals(void) { int i; for (i = 0; i < _SIGNO_MAX; i++) { Index: trunk/src/modules/lib/posix/wait.c =================================================================== --- trunk.orig/src/modules/lib/posix/wait.c +++ trunk/src/modules/lib/posix/wait.c @@ -56,7 +56,7 @@ static void rpc_child_exit(pid_t pid, dw /** * Wait-Funktionen initialisieren */ -void init_waitpid() +void init_waitpid(void) { wait_list = list_create(); register_message_handler("CHL_EXIT", &rpc_child_exit); Index: trunk/src/modules/lib/rpc/messaging.c =================================================================== --- trunk.orig/src/modules/lib/rpc/messaging.c +++ trunk/src/modules/lib/rpc/messaging.c @@ -42,7 +42,7 @@ // Diese Deklaration ist so eigentlich nicht richtig, der RPC-Handler nimmt // durchaus Parameter. Allerdings folgt das ganze sowieso nicht dem // C-Aufrufschema, so da�jede andere Deklaration genauso falsch w�. -extern void librpc_rpc_handler(); +extern void librpc_rpc_handler(void); void timer_callback(dword timer_id); @@ -51,7 +51,7 @@ typedef struct { handler_function_t handler; } msg_handler_t; -void (*intr_handler[256])() = { NULL }; +void (*intr_handler[256])(void) = { NULL }; msg_handler_t message_handler[MAX_MESSAGE_HANDLERS]; handler_function_t rpc_response_handler = NULL; @@ -102,7 +102,7 @@ bool register_message_handler(char* fnna return TRUE; } -void register_intr_handler(byte intr, void (*handler)()) +void register_intr_handler(byte intr, void (*handler)(void)) { intr_handler[intr] = handler; add_intr_handler(intr); Index: trunk/src/modules/lib/rpc/sync.c =================================================================== --- trunk.orig/src/modules/lib/rpc/sync.c +++ trunk/src/modules/lib/rpc/sync.c @@ -66,7 +66,7 @@ void sync_rpc_response_handler(pid_t cal * Bei der Intialisierung responses wird auf eine leere Liste gesetzt und der * rpc_response_handler gesetzt. */ -void init_sync_messages() +void init_sync_messages(void) { responses = list_create(); rpc_response_handler = &sync_rpc_response_handler; Index: trunk/src/modules/lib/rpc/timer.c =================================================================== --- trunk.orig/src/modules/lib/rpc/timer.c +++ trunk/src/modules/lib/rpc/timer.c @@ -43,11 +43,11 @@ static list_t* timers; static dword next_timer_id = 0; struct timeout { - void (*callback)(); + void (*callback)(void); dword timer_id; }; -dword timer_register(void (*callback)(), dword usec) +dword timer_register(void (*callback)(void), dword usec) { // Initialisieren der Liste if (!timers) { Index: trunk/src/modules/lib/servmgr.c =================================================================== --- trunk.orig/src/modules/lib/servmgr.c +++ trunk/src/modules/lib/servmgr.c @@ -38,8 +38,9 @@ #include <rpc.h> #include <services.h> #include <syscall.h> +#include <services.h> -static pid_t servmgr_pid(); +static pid_t servmgr_pid(void); bool servmgr_need(const char* service_name) { Index: trunk/src/modules/lib/stdlibc/rand.c =================================================================== --- trunk.orig/src/modules/lib/stdlibc/rand.c +++ trunk/src/modules/lib/stdlibc/rand.c @@ -33,9 +33,7 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <stdio.h> -#include <math.h> -#include <lost/config.h> +#include <stdlib.h> #include <syscall.h> static int rnd_seed = 0; Index: trunk/src/modules/lib/stdlibc/stdio.c =================================================================== --- trunk.orig/src/modules/lib/stdlibc/stdio.c +++ trunk/src/modules/lib/stdlibc/stdio.c @@ -47,7 +47,7 @@ FILE* stderr = NULL; /** * Initialisiert die Ein- und Ausgabe Filehandles */ -void stdio_init() +void stdio_init(void) { FILE* path_file; char path[129]; Index: trunk/src/modules/lib/syscalls/set_rpc_handler.c =================================================================== --- trunk.orig/src/modules/lib/syscalls/set_rpc_handler.c +++ trunk/src/modules/lib/syscalls/set_rpc_handler.c @@ -1,6 +1,6 @@ #include "syscall.h" -void set_rpc_handler(void (*rpc_handler)()) +void set_rpc_handler(void (*rpc_handler)(void)) { asm( "pushl %1;" Index: trunk/src/kernel/include/gdt.h =================================================================== --- trunk.orig/src/kernel/include/gdt.h +++ trunk/src/kernel/include/gdt.h @@ -17,7 +17,7 @@ #define USER_DATA_SEL 0x20 #define TSS_SEL 0x28 -void init_gdt(); +void init_gdt(void); void gdt_set_descriptor(int segment, dword size, dword base, byte access, int dpl); void gdt_set_descriptor_byte_granularity(int segment, dword size, dword base, byte access, int dpl); Index: trunk/src/kernel/include/intr.h =================================================================== --- trunk.orig/src/kernel/include/intr.h +++ trunk/src/kernel/include/intr.h @@ -14,7 +14,7 @@ #define IDT_DESC_PRESENT 0x80 -void init_idt(); +void init_idt(void); void set_intr(int intr, word selector, void* handler, int dpl, int type); void set_intr_handling_task(byte intr, struct task * task); Index: trunk/src/kernel/include/io.h =================================================================== --- trunk.orig/src/kernel/include/io.h +++ trunk/src/kernel/include/io.h @@ -39,7 +39,7 @@ #include "types.h" #include "tasks.h" -void init_io_ports(); +void init_io_ports(void); bool io_ports_request(struct task* task, dword port, dword length); bool io_ports_release(struct task* task, dword port, dword length); void io_ports_release_all(struct task* task); Index: trunk/src/kernel/include/kernel.h =================================================================== --- trunk.orig/src/kernel/include/kernel.h +++ trunk/src/kernel/include/kernel.h @@ -7,10 +7,10 @@ __attribute__((noreturn)) void panic(char * message, ...); -void * phys_alloc_page(); +void * phys_alloc_page(void); void * phys_alloc_page_range(unsigned int num); -void * phys_alloc_dma_page(); +void * phys_alloc_dma_page(void); void * phys_alloc_dma_page_range(unsigned int num); void * phys_alloc_page_limit(dword lower_limit); @@ -18,9 +18,9 @@ void * phys_alloc_page_limit(dword lower void phys_free_page(void * page); void phys_free_page_range(void * page, unsigned int num); -extern void kernel_start(); -extern void kernel_phys_start(); -extern void kernel_end(); -extern void kernel_phys_end(); +extern void kernel_start(void); +extern void kernel_phys_start(void); +extern void kernel_end(void); +extern void kernel_phys_end(void); #endif /* ndef KERNEL_H */ Index: trunk/src/kernel/include/phys.h =================================================================== --- trunk.orig/src/kernel/include/phys.h +++ trunk/src/kernel/include/phys.h @@ -2,8 +2,8 @@ #define _PHYS_H_ void phys_mark_page_as_free(void * page); -unsigned long phys_count_free_pages(); -unsigned long phys_count_pages(); +unsigned long phys_count_free_pages(void); +unsigned long phys_count_pages(void); void * phys_alloc_dma_page_range_64k(unsigned int num); Index: trunk/src/kernel/include/tasks.h =================================================================== --- trunk.orig/src/kernel/include/tasks.h +++ trunk/src/kernel/include/tasks.h @@ -62,10 +62,10 @@ extern struct task* first_task; void schedule(dword* esp); void schedule_to_task(struct task* target_task, dword* esp); -void set_io_bitmap(); +void set_io_bitmap(void); // TODO: Nur wegen vm86.c hier -pid_t generate_pid(); +pid_t generate_pid(void); struct task * create_task(void * entry, const char* cmdline, pid_t parent); void destroy_task(struct task* task); struct task * get_task(pid_t pid); Index: trunk/src/kernel/include/timer.h =================================================================== --- trunk.orig/src/kernel/include/timer.h +++ trunk/src/kernel/include/timer.h @@ -39,7 +39,7 @@ #include <types.h> #include "tasks.h" -void timer_init(); +void timer_init(void); void timer_register(struct task* task, dword timer_id, dword usec); void timer_notify(qword microtime); void timer_cancel_all(struct task* task); Index: trunk/src/kernel/src/console.c =================================================================== --- trunk.orig/src/kernel/src/console.c +++ trunk/src/kernel/src/console.c @@ -87,7 +87,7 @@ #define SCREEN_WIDTH 80 #define SCREEN_HEIGHT 25 -void con_set_hw_cursor(); +static void con_set_hw_cursor(void); static unsigned short * vidmem = (unsigned short*)0xb8000; @@ -148,7 +148,7 @@ static void con_set_cursor_pos(unsigned /** * Leert den Bildschirm */ -static void con_clear_screen() +static void con_clear_screen(void) { int i; @@ -163,7 +163,7 @@ static void con_clear_screen() /** * Scrollt eine Zeile nach unten */ -static void scroll_down() +static void scroll_down(void) { int i; @@ -598,7 +598,7 @@ void init_console(void) /** * Aktualisiert die Postition des Hardware Cursors */ -void con_set_hw_cursor() +static void con_set_hw_cursor() { //Hardware Cursor verschieben word hw_cursor_pos = cursor_x + cursor_y * SCREEN_WIDTH; Index: trunk/src/kernel/src/debug.c =================================================================== --- trunk.orig/src/kernel/src/debug.c +++ trunk/src/kernel/src/debug.c @@ -164,7 +164,7 @@ void stack_backtrace_ebp(dword start_ebp } } -void stack_backtrace() +void stack_backtrace(void) { stack_backtrace_ebp(0, 0); } @@ -223,7 +223,7 @@ void debug_print(dword flag, const char* } -void print_tasks_backtrace() +void print_tasks_backtrace(void) { struct task* task = first_task; struct int_stack_frame* isf; Index: trunk/src/kernel/src/init.c =================================================================== --- trunk.orig/src/kernel/src/init.c +++ trunk/src/kernel/src/init.c @@ -61,8 +61,8 @@ struct multiboot_info multiboot_info; extern void init_phys_mem(vaddr_t mmap_addr, dword mmap_length, dword upper_mem); -extern void init_paging(); -extern void init_console(); +extern void init_paging(void); +extern void init_console(void); extern void init_scheduler(void); extern void init_stack_backtrace(void); @@ -143,7 +143,7 @@ void init(int multiboot_magic, struct mu } } -extern void stack_backtrace(); +extern void stack_backtrace(void); __attribute__((noreturn)) void panic(char * message, ...) { @@ -176,5 +176,5 @@ __attribute__((noreturn)) void panic(cha } } -void p() {} -void v() {} +void p(void) {} +void v(void) {} Index: trunk/src/kernel/src/intr.c =================================================================== --- trunk.orig/src/kernel/src/intr.c +++ trunk/src/kernel/src/intr.c @@ -70,46 +70,46 @@ struct task * intr_handling_task[256] = void handle_irq(int irq, dword* esp); -extern void null_handler(); +extern void null_handler(void); -extern void exception_stub_0(); -extern void exception_stub_1(); -extern void exception_stub_2(); -extern void exception_stub_3(); -extern void exception_stub_4(); -extern void exception_stub_5(); -extern void exception_stub_6(); -extern void exception_stub_7(); -extern void exception_stub_8(); -extern void exception_stub_9(); -extern void exception_stub_10(); -extern void exception_stub_11(); -extern void exception_stub_12(); -extern void exception_stub_13(); -extern void exception_stub_14(); -extern void exception_stub_16(); -extern void exception_stub_17(); -extern void exception_stub_18(); -extern void exception_stub_19(); - -extern void irq_stub_0(); -extern void irq_stub_1(); -extern void irq_stub_2(); -extern void irq_stub_3(); -extern void irq_stub_4(); -extern void irq_stub_5(); -extern void irq_stub_6(); -extern void irq_stub_7(); -extern void irq_stub_8(); -extern void irq_stub_9(); -extern void irq_stub_10(); -extern void irq_stub_11(); -extern void irq_stub_12(); -extern void irq_stub_13(); -extern void irq_stub_14(); -extern void irq_stub_15(); +extern void exception_stub_0(void); +extern void exception_stub_1(void); +extern void exception_stub_2(void); +extern void exception_stub_3(void); +extern void exception_stub_4(void); +extern void exception_stub_5(void); +extern void exception_stub_6(void); +extern void exception_stub_7(void); +extern void exception_stub_8(void); +extern void exception_stub_9(void); +extern void exception_stub_10(void); +extern void exception_stub_11(void); +extern void exception_stub_12(void); +extern void exception_stub_13(void); +extern void exception_stub_14(void); +extern void exception_stub_16(void); +extern void exception_stub_17(void); +extern void exception_stub_18(void); +extern void exception_stub_19(void); + +extern void irq_stub_0(void); +extern void irq_stub_1(void); +extern void irq_stub_2(void); +extern void irq_stub_3(void); +extern void irq_stub_4(void); +extern void irq_stub_5(void); +extern void irq_stub_6(void); +extern void irq_stub_7(void); +extern void irq_stub_8(void); +extern void irq_stub_9(void); +extern void irq_stub_10(void); +extern void irq_stub_11(void); +extern void irq_stub_12(void); +extern void irq_stub_13(void); +extern void irq_stub_14(void); +extern void irq_stub_15(void); -extern void syscall_stub(); +extern void syscall_stub(void); extern void stack_backtrace_ebp(dword start_ebp, dword start_eip); Index: trunk/src/kernel/src/io.c =================================================================== --- trunk.orig/src/kernel/src/io.c +++ trunk/src/kernel/src/io.c @@ -42,7 +42,7 @@ /* Gesetztes Bit: Port wird benutzt */ byte global_port_bitmap[IO_BITMAP_LENGTH / 8] = { 0 }; -void init_io_ports() +void init_io_ports(void) { // Setze IO-Privilege-Level auf 0 asm volatile( Index: trunk/src/kernel/src/mm/paging.c =================================================================== --- trunk.orig/src/kernel/src/mm/paging.c +++ trunk/src/kernel/src/mm/paging.c @@ -71,7 +71,7 @@ bool use_phys_page_tables; * * Die physische Speicherverwaltung muss dazu bereits initialisiert sein. */ -void init_paging() +void init_paging(void) { use_phys_page_tables = TRUE; Index: trunk/src/kernel/src/mm/phys.c =================================================================== --- trunk.orig/src/kernel/src/mm/phys.c +++ trunk/src/kernel/src/mm/phys.c @@ -48,8 +48,8 @@ extern struct multiboot_info multiboot_info; /* Diese beiden werden in kernel.ld definiert. */ -extern void kernel_phys_start(); -extern void kernel_phys_end(); +extern void kernel_phys_start(void); +extern void kernel_phys_end(void); unsigned long * phys_mmap; unsigned long phys_mmap_size; Index: trunk/src/kernel/src/schedule.c =================================================================== --- trunk.orig/src/kernel/src/schedule.c +++ trunk/src/kernel/src/schedule.c @@ -54,12 +54,12 @@ int current_task_num; qword timer_ticks = 0; -void set_io_bitmap(); +void set_io_bitmap(void); /** * Wird bei Kooperativem Multitasking benutzt zum handeln des Timers */ -void do_nothing() {} +void do_nothing(void) {} /** Index: trunk/src/kernel/src/syscall.c =================================================================== --- trunk.orig/src/kernel/src/syscall.c +++ trunk/src/kernel/src/syscall.c @@ -59,7 +59,7 @@ extern void timer_irq(int irq, dword* esp); extern qword timer_ticks; -extern void set_io_bitmap(); +extern void set_io_bitmap(void); #ifdef CONFIG_DEBUG_LAST_SYSCALL dword debug_last_syscall_no = 0; Index: trunk/src/modules/file/client.c =================================================================== --- trunk.orig/src/modules/file/client.c +++ trunk/src/modules/file/client.c @@ -40,7 +40,7 @@ #include "file.h" -static void client_print_usage() +static void client_print_usage(void) { puts("Aufruf: file mount file:/<Quelle> <Ziel>"); } Index: trunk/src/modules/tcpip/include/arp.h =================================================================== --- trunk.orig/src/modules/tcpip/include/arp.h +++ trunk/src/modules/tcpip/include/arp.h @@ -60,7 +60,7 @@ struct arp { dword dest_ip; } __attribute__ ((packed)); -void init_arp(); +void init_arp(void); void arp_receive(struct device *device, void* packet, size_t size); Index: trunk/src/modules/tcpip/include/ethernet.h =================================================================== --- trunk.orig/src/modules/tcpip/include/ethernet.h +++ trunk/src/modules/tcpip/include/ethernet.h @@ -48,7 +48,7 @@ struct eth_packet_header { word type; } __attribute__ ((packed)); -void init_ethernet(); +void init_ethernet(void); void ethernet_send_packet(struct device *device, void *packet, size_t size); Index: trunk/src/modules/tcpip/include/ip.h =================================================================== --- trunk.orig/src/modules/tcpip/include/ip.h +++ trunk/src/modules/tcpip/include/ip.h @@ -72,12 +72,12 @@ struct ip_header { #define IP_FLAG_MORE_FRAGMENTS (1 << 13) #define IP_FLAG_DONT_FRAGMENT (1 << 14) -void init_ip(); +void init_ip(void); void add_routing_entry(struct routing_entry* entry); struct routing_entry* get_routing_entry(dword ip); struct routing_entry* enum_routing_entry(size_t i); -size_t routing_get_entry_count(); +size_t routing_get_entry_count(void); bool ip_send(dword dest_ip, byte proto, void* data, size_t data_size); bool ip_send_packet(struct ip_header* header, void* data, dword size); Index: trunk/src/modules/tcpip/include/lostio_if.h =================================================================== --- trunk.orig/src/modules/tcpip/include/lostio_if.h +++ trunk/src/modules/tcpip/include/lostio_if.h @@ -38,7 +38,7 @@ #include "main.h" -void init_lostio_interface(); +void init_lostio_interface(void); void lostio_add_driver(struct driver *driver); void lostio_add_device(struct device *device); Index: trunk/src/modules/tcpip/include/tcp.h =================================================================== --- trunk.orig/src/modules/tcpip/include/tcp.h +++ trunk/src/modules/tcpip/include/tcp.h @@ -108,7 +108,7 @@ struct tcp_out_buffer { }; -void init_tcp(); +void init_tcp(void); struct tcp_connection* tcp_open_connection(dword ip, word port); word tcp_checksum Index: trunk/src/modules/tcpip/lostio_if.c =================================================================== --- trunk.orig/src/modules/tcpip/lostio_if.c +++ trunk/src/modules/tcpip/lostio_if.c @@ -87,7 +87,7 @@ size_t lostio_route_read(lostio_filehand size_t lostio_route_write(lostio_filehandle_t*,size_t,size_t,void*); int lostio_route_close(lostio_filehandle_t*); -void init_lostio_interface() +void init_lostio_interface(void) { lostio_init(); lostio_type_directory_use(); Index: trunk/src/modules/tcpip/tcp.c =================================================================== --- trunk.orig/src/modules/tcpip/tcp.c +++ trunk/src/modules/tcpip/tcp.c @@ -74,7 +74,7 @@ void init_tcp() tcp_connections = list_create(); } -static word tcp_get_free_port() +static word tcp_get_free_port(void) { // FIXME static word source_port = 32768; Index: trunk/src/modules/c/fdisk/fdisk.c =================================================================== --- trunk.orig/src/modules/c/fdisk/fdisk.c +++ trunk/src/modules/c/fdisk/fdisk.c @@ -55,7 +55,7 @@ static int unsaved_changes = 0; * auf einen Tastendruck wartet. */ // TODO Entfernen, sobald getchar wie erwartet funktioniert -static char keyboard_read_char() +static char keyboard_read_char(void) { fflush(stdout); char c = 0; @@ -100,7 +100,7 @@ static unsigned char hex2uint8(char c1, } /** Gibt alle Partitionen auf der bearbeiten Platte nach stdout aus */ -static void shell_list_partitions() +static void shell_list_partitions(void) { // Allgemeine Daten und Statistiken printf("%s\n", device_name); @@ -126,7 +126,7 @@ static void shell_list_partitions() } /** Aendert das bootable-Flag einer Partition */ -static void shell_toggle_bootable() +static void shell_toggle_bootable(void) { // TODO extended/logical partitions unterstuetzen @@ -166,7 +166,7 @@ static void shell_toggle_bootable() * Schreibt die vorgenommenen Aenderungen an der Partitionstabelle * auf die Festplatte. */ -static void shell_write() +static void shell_write(void) { // Sollen die aenderungen wirklich auf die HDD geschrieben werden? printf("WARNUNG: Sie sollten sich absolut sicher sein, was Sie tun! " @@ -185,7 +185,7 @@ static void shell_write() } /** Loescht eine Partition */ -static void shell_delete() +static void shell_delete(void) { // Den User nach der Partitionsnummer fragen. Den passenden Array Index // erhaelt man durch Subtraktion von 1 @@ -213,7 +213,7 @@ static void shell_delete() } /** Listet alle bekannten Partitionstypen auf */ -static void shell_typelist() +static void shell_typelist(void) { int i; int types_printed = 0; @@ -233,7 +233,7 @@ static void shell_typelist() } /** Setzt den Partitionstyp */ -static void shell_settype() +static void shell_settype(void) { // Den User nach der Partitionsnummer fragen. Den passenden Array Index // erhaelt man durch Subtraktion von 1 @@ -284,7 +284,7 @@ static void shell_settype() } /** Erstellt eine neue Partition */ -static void shell_new() +static void shell_new(void) { // TODO extended/logical partitions unterstuetzen // TODO Funktion etwas aufraeumen @@ -395,7 +395,7 @@ static void shell_new() } /** fdisk-Shell, das Hauptmenue. Ruft alle anderen Funktionen auf. */ -static void shell() +static void shell(void) { printf("h fuer Hilfe\n"); Index: trunk/src/modules/c/fdisk/partition.c =================================================================== --- trunk.orig/src/modules/c/fdisk/partition.c +++ trunk/src/modules/c/fdisk/partition.c @@ -149,7 +149,7 @@ void delete_partition(struct partition_t p->exists = 0; } -static void create_new_mbr_partition_table() +static void create_new_mbr_partition_table(void) { memset(&mbr[PARTITION_TABLE_START], 0, 4 * sizeof(struct partition_entry_t)); Index: trunk/src/modules/c/fdisk/partition.h =================================================================== --- trunk.orig/src/modules/c/fdisk/partition.h +++ trunk/src/modules/c/fdisk/partition.h @@ -88,7 +88,7 @@ struct partition_t /// Berechnet den Endsektor einer Partition long get_end_sector(struct partition_t* p); /// Gibt die Disk Signature des zurueck -uint32_t get_disk_signature(); +uint32_t get_disk_signature(void); /// Zerlegt die 3 Byte grossen CHS Eintraege void uncompress_chs(uint8_t* compressed, unsigned int* cylinder, unsigned int* head, unsigned int* sector); @@ -108,7 +108,7 @@ int read_partitions(char* filename); * Neuen MBR erstellen und auf Festplatte schreiben. Gibt 0 zurueck, * wenn erfolgreich */ -int apply_changes(); +int apply_changes(void); /// Loescht eine Partition void delete_partition(struct partition_t* p); Index: trunk/src/modules/c/shell/cmds/bincat.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/bincat.c +++ trunk/src/modules/c/shell/cmds/bincat.c @@ -41,7 +41,7 @@ #define BLOCK_SIZE 1024 -void bincat_display_usage(); +void bincat_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_bincat(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/cat.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/cat.c +++ trunk/src/modules/c/shell/cmds/cat.c @@ -41,7 +41,7 @@ #define BLOCK_SIZE 1024 -void cat_display_usage(); +void cat_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_cat(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/cp.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/cp.c +++ trunk/src/modules/c/shell/cmds/cp.c @@ -45,7 +45,7 @@ #define BUFFER_SIZE 4096 -void cp_display_usage(); +void cp_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_cp(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/date.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/date.c +++ trunk/src/modules/c/shell/cmds/date.c @@ -38,7 +38,7 @@ #include "stdio.h" #include <lost/config.h> -void date_display_usage(); +void date_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_date(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/dbg_st.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/dbg_st.c +++ trunk/src/modules/c/shell/cmds/dbg_st.c @@ -41,7 +41,7 @@ #include <lost/config.h> #include <syscall.h> -void dbg_st_display_usage(); +void dbg_st_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_dbg_st(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/irc.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/irc.c +++ trunk/src/modules/c/shell/cmds/irc.c @@ -40,7 +40,7 @@ #include <lost/config.h> #include "sleep.h" -void irc_display_usage(); +void irc_display_usage(void); void irc_set_nick(char* nick); void irc_set_user(char* user, char* fullname); Index: trunk/src/modules/c/shell/cmds/ln.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/ln.c +++ trunk/src/modules/c/shell/cmds/ln.c @@ -40,7 +40,7 @@ #include "dir.h" #include <lost/config.h> -void ln_display_usage(); +void ln_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_ln(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/ls.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/ls.c +++ trunk/src/modules/c/shell/cmds/ls.c @@ -40,7 +40,7 @@ #include "unistd.h" #include <lost/config.h> -void ls_display_usage(); +void ls_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_ls(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/mkdir.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/mkdir.c +++ trunk/src/modules/c/shell/cmds/mkdir.c @@ -40,7 +40,7 @@ #include "dir.h" #include <lost/config.h> -void mkdir_display_usage(); +void mkdir_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_mkdir(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/pipe.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/pipe.c +++ trunk/src/modules/c/shell/cmds/pipe.c @@ -39,7 +39,7 @@ #include "unistd.h" #include <lost/config.h> -void pipe_display_usage(); +void pipe_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_pipe(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/ps.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/ps.c +++ trunk/src/modules/c/shell/cmds/ps.c @@ -40,7 +40,7 @@ #include "unistd.h" #include <lost/config.h> -void ps_display_usage(); +void ps_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_ps(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/pstree.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/pstree.c +++ trunk/src/modules/c/shell/cmds/pstree.c @@ -39,7 +39,7 @@ #include "unistd.h" #include <lost/config.h> -void pstree_display_usage(); +void pstree_display_usage(void); void pstree_show_children(pid_t pid, byte depth); task_info_t* task_info; Index: trunk/src/modules/c/shell/cmds/pwd.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/pwd.c +++ trunk/src/modules/c/shell/cmds/pwd.c @@ -39,7 +39,7 @@ #include "unistd.h" #include <lost/config.h> -void pwd_display_usage(); +void pwd_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_pwd(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/readlink.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/readlink.c +++ trunk/src/modules/c/shell/cmds/readlink.c @@ -40,7 +40,7 @@ #include "io.h" #include <lost/config.h> -void readlink_display_usage(); +void readlink_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_readlink(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/rm.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/rm.c +++ trunk/src/modules/c/shell/cmds/rm.c @@ -40,7 +40,7 @@ #include "dir.h" #include <lost/config.h> -void rm_display_usage(); +void rm_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_rm(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/set.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/set.c +++ trunk/src/modules/c/shell/cmds/set.c @@ -42,8 +42,8 @@ #include "unistd.h" #include <lost/config.h> -void set_display_usage(); -void set_list_vars(); +void set_display_usage(void); +void set_list_vars(void); int shell_command_set(int argc, char* argv[], const char* args) { Index: trunk/src/modules/c/shell/cmds/sleep.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/sleep.c +++ trunk/src/modules/c/shell/cmds/sleep.c @@ -39,7 +39,7 @@ #include <lost/config.h> #include <unistd.h> -void sleep_display_usage(); +void sleep_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_sleep(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/cmds/stat.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/stat.c +++ trunk/src/modules/c/shell/cmds/stat.c @@ -40,7 +40,7 @@ #include <sys/stat.h> #include <fcntl.h> -void stat_display_usage(); +void stat_display_usage(void); void stat_display_results(const char* path, struct stat* stat_buf); #ifdef CONFIG_SHELL_BUILTIN_ONLY Index: trunk/src/modules/c/shell/cmds/symlink.c =================================================================== --- trunk.orig/src/modules/c/shell/cmds/symlink.c +++ trunk/src/modules/c/shell/cmds/symlink.c @@ -40,7 +40,7 @@ #include "io.h" #include <lost/config.h> -void symlink_display_usage(); +void symlink_display_usage(void); #ifdef CONFIG_SHELL_BUILTIN_ONLY int shell_command_symlink(int argc, char* argv[], const char* args) Index: trunk/src/modules/c/shell/shell.c =================================================================== --- trunk.orig/src/modules/c/shell/shell.c +++ trunk/src/modules/c/shell/shell.c @@ -61,10 +61,10 @@ char shell_command_buffer[COMMAND_BUFFER_SIZE]; -char keyboard_read_char(); -void shell_read_command(); +char keyboard_read_char(void); +void shell_read_command(void); bool shell_check_command(const char* cmd); -int shell_do_cmd(); +int shell_do_cmd(void); shell_command_t shell_commands[] = { @@ -165,7 +165,7 @@ int main(int argc, char* argv[]) } ///Prompt anzeigen und Shellkommando von der Tastatur einlesen -void shell_read_command() +void shell_read_command(void) { char* cwd = getcwd(NULL, 0); char* prompt; @@ -252,7 +252,7 @@ static void buffer_replace(const char* s /** * Umgebungsvariablen im Puffer ersetzen */ -static void substitute_envvars() +static void substitute_envvars(void) { int i; const char* name; @@ -271,7 +271,7 @@ static void substitute_envvars() } } -int shell_do_cmd() +int shell_do_cmd(void) { shell_command_t* command; dword i; Index: trunk/src/modules/c/shell/shell.h =================================================================== --- trunk.orig/src/modules/c/shell/shell.h +++ trunk/src/modules/c/shell/shell.h @@ -47,7 +47,7 @@ extern shell_command_t shell_commands[]; bool shell_script(const char* path); bool shell_match_command(const char* cmd, const char* cmdline); -void completion_init(); +void completion_init(void); int shell_command_default(int argc, char* argv[], const char* args); int shell_command_help(int argc, char* argv[], const char* args); Index: trunk/src/modules/cdi/ata/main.c =================================================================== --- trunk.orig/src/modules/cdi/ata/main.c +++ trunk/src/modules/cdi/ata/main.c @@ -51,13 +51,13 @@ static struct ata_driver driver; static const char* driver_name = "ata"; static cdi_list_t controller_list = NULL; -static void ata_driver_init(); -static void ata_driver_destroy(); +static void ata_driver_init(void); +static void ata_driver_destroy(struct cdi_driver* driver); #ifdef CDI_STANDALONE -int main() +int main(void) #else -int init_ata +int init_ata(void) #endif { cdi_init(); @@ -117,11 +117,11 @@ static void ata_driver_init() } /** - * Deinitialisiert die Datenstrukturen fuer den sis900-Treiber + * Deinitialisiert die Datenstrukturen fuer den ata-Treiber */ -static void ata_driver_destroy(void) +static void ata_driver_destroy(struct cdi_driver* driver) { - cdi_storage_driver_destroy((struct cdi_storage_driver*) &driver); + cdi_storage_driver_destroy((struct cdi_storage_driver*) driver); // TODO Alle Karten deinitialisieren } Index: trunk/src/modules/cdi/e1000/main.c =================================================================== --- trunk.orig/src/modules/cdi/e1000/main.c +++ trunk/src/modules/cdi/e1000/main.c @@ -50,13 +50,13 @@ struct e1000_driver { static struct e1000_driver driver; static const char* driver_name = "e1000"; -static void e1000_driver_init(); -static void e1000_driver_destroy(); +static void e1000_driver_init(void); +static void e1000_driver_destroy(struct cdi_driver* driver); #ifdef CDI_STANDALONE -int main() +int main(void) #else -int init_e1000() +int init_e1000(void) #endif { cdi_init(); @@ -122,9 +122,9 @@ static void e1000_driver_init() /** * Deinitialisiert die Datenstrukturen fuer den e1000-Treiber */ -static void e1000_driver_destroy(void) +static void e1000_driver_destroy(struct cdi_driver* driver) { - cdi_net_driver_destroy((struct cdi_net_driver*) &driver); + cdi_net_driver_destroy((struct cdi_net_driver*) driver); // TODO Alle Karten deinitialisieren } Index: trunk/src/modules/cdi/ext2/main.c =================================================================== --- trunk.orig/src/modules/cdi/ext2/main.c +++ trunk/src/modules/cdi/ext2/main.c @@ -53,9 +53,9 @@ static int ext2_driver_init(struct ext2_ static void ext2_driver_destroy(struct cdi_driver* driver); #ifdef CDI_STANDALONE -int main() +int main(void) #else -int init_ext2 +int init_ext2(void) #endif { cdi_init(); Index: trunk/src/modules/cdi/floppy/main.c =================================================================== --- trunk.orig/src/modules/cdi/floppy/main.c +++ trunk/src/modules/cdi/floppy/main.c @@ -58,9 +58,9 @@ static int floppy_driver_init(struct flo static void floppy_driver_destroy(struct cdi_driver* driver); #ifdef CDI_STANDALONE -int main() +int main(void) #else -int init_floppy +int init_floppy(void) #endif { cdi_init(); Index: trunk/src/modules/cdi/include/cdi.h =================================================================== --- trunk.orig/src/modules/cdi/include/cdi.h +++ trunk/src/modules/cdi/include/cdi.h @@ -38,7 +38,7 @@ struct cdi_driver { void (*init_device)(struct cdi_device* device); void (*remove_device)(struct cdi_device* device); - void (*destroy)(); + void (*destroy)(struct cdi_driver* driver); }; /** Index: trunk/src/modules/cdi/include/cdi/lists.h =================================================================== --- trunk.orig/src/modules/cdi/include/cdi/lists.h +++ trunk/src/modules/cdi/include/cdi/lists.h @@ -27,7 +27,7 @@ typedef struct cdi_list_implementation* * @return Neu erzeugte Liste oder NULL, falls kein Speicher reserviert werden * konnte */ -cdi_list_t cdi_list_create(); +cdi_list_t cdi_list_create(void); /** * Gibt eine Liste frei (Werte der Listenglieder müssen bereits Index: trunk/src/modules/cdi/lib/cache.c =================================================================== --- trunk.orig/src/modules/cdi/lib/cache.c +++ trunk/src/modules/cdi/lib/cache.c @@ -304,7 +304,7 @@ int cdi_cache_sync(struct cdi_cache* cac /** * Caches Synchronisieren */ -void caches_sync_all() +void caches_sync_all(void) { size_t i; struct cache* c; Index: trunk/src/modules/cdi/lib/cdi.c =================================================================== --- trunk.orig/src/modules/cdi/lib/cdi.c +++ trunk/src/modules/cdi/lib/cdi.c @@ -25,12 +25,12 @@ static void cdi_destroy(void); /** * Caches Synchronisieren */ -extern void caches_sync_all(); +extern void caches_sync_all(void); /** * Timerhandler um die Caches zu syncen */ -static void timer_sync_caches() +static void timer_sync_caches(void) { caches_sync_all(); timer_register(timer_sync_caches, 2000000); Index: trunk/src/modules/cdi/lib/misc.c =================================================================== --- trunk.orig/src/modules/cdi/lib/misc.c +++ trunk/src/modules/cdi/lib/misc.c @@ -23,7 +23,7 @@ static struct cdi_device* driver_irq_dev /** * Interner IRQ-Handler, der den IRQ-Handler des Treibers aufruft */ -static void irq_handler() +static void irq_handler(void) { driver_irq_handler(driver_irq_device); } Index: trunk/src/modules/cdi/lib/storage.c =================================================================== --- trunk.orig/src/modules/cdi/lib/storage.c +++ trunk/src/modules/cdi/lib/storage.c @@ -16,7 +16,7 @@ #include "cdi/storage.h" -static void lostio_mst_if_init(); +static void lostio_mst_if_init(void); static int lostio_mst_if_newdev(struct cdi_storage_device* device); static size_t lostio_mst_read_handler(lostio_filehandle_t* fh, Index: trunk/src/modules/cdi/pcnet/main.c =================================================================== --- trunk.orig/src/modules/cdi/pcnet/main.c +++ trunk/src/modules/cdi/pcnet/main.c @@ -57,7 +57,7 @@ uint32_t string_to_ip(char* ip); static void process_parameter(struct module_options* options, char* param); static int pcnet_driver_init(int argc, char* argv[]); -static void pcnet_driver_destroy(void); +static void pcnet_driver_destroy(struct cdi_driver* driver); #ifdef CDI_STANDALONE int main(int argc, char* argv[]) @@ -147,9 +147,9 @@ static void process_parameter(struct mod /** * Deinitialisiert die Datenstrukturen fuer den pcnet-Treiber */ -static void pcnet_driver_destroy(void) +static void pcnet_driver_destroy(struct cdi_driver* driver) { - cdi_net_driver_destroy((struct cdi_net_driver*) &driver); + cdi_net_driver_destroy((struct cdi_net_driver*) driver); // TODO Alle Karten deinitialisieren } Index: trunk/src/modules/cdi/rtl8139/main.c =================================================================== --- trunk.orig/src/modules/cdi/rtl8139/main.c +++ trunk/src/modules/cdi/rtl8139/main.c @@ -56,7 +56,7 @@ uint32_t string_to_ip(char* ip); static void process_parameter(struct module_options* options, char* param); static int rtl8139_driver_init(int argc, char* argv[]); -static void rtl8139_driver_destroy(void); +static void rtl8139_driver_destroy(struct cdi_driver* driver); #ifdef CDI_STANDALONE int main(int argc, char* argv[]) @@ -149,9 +149,9 @@ static void process_parameter(struct mod /** * Deinitialisiert die Datenstrukturen fuer den rtl8139-Treiber */ -static void rtl8139_driver_destroy(void) +static void rtl8139_driver_destroy(struct cdi_driver* driver) { - cdi_net_driver_destroy((struct cdi_net_driver*) &driver); + cdi_net_driver_destroy((struct cdi_net_driver*) driver); // TODO Alle Karten deinitialisieren } Index: trunk/src/modules/cdi/rtl8139/rtl8139.c =================================================================== --- trunk.orig/src/modules/cdi/rtl8139/rtl8139.c +++ trunk/src/modules/cdi/rtl8139/rtl8139.c @@ -50,7 +50,7 @@ //#define DEBUG_MSG(s) printf("[RTL8139] debug: %s() '%s'\n", __FUNCTION__, s) #define DEBUG_MSG(s) // -static void rtl8139_handle_interrupt(); +static void rtl8139_handle_interrupt(struct cdi_device* device); static inline void write_register_byte(struct rtl8139_device* netcard, uint8_t reg, uint8_t value) { Index: trunk/src/modules/cdi/sis900/main.c =================================================================== --- trunk.orig/src/modules/cdi/sis900/main.c +++ trunk/src/modules/cdi/sis900/main.c @@ -50,13 +50,13 @@ struct sis900_driver { static struct sis900_driver driver; static const char* driver_name = "sis900"; -static void sis900_driver_init(); -static void sis900_driver_destroy(); +static void sis900_driver_init(void); +static void sis900_driver_destroy(struct cdi_driver* driver); #ifdef CDI_STANDALONE -int main() +int main(void) #else -int init_sis900() +int init_sis900(void) #endif { cdi_init(); @@ -122,9 +122,9 @@ static void sis900_driver_init() /** * Deinitialisiert die Datenstrukturen fuer den sis900-Treiber */ -static void sis900_driver_destroy(void) +static void sis900_driver_destroy(struct cdi_driver* driver) { - cdi_net_driver_destroy((struct cdi_net_driver*) &driver); + cdi_net_driver_destroy((struct cdi_net_driver*) driver); // TODO Alle Karten deinitialisieren } Index: trunk/src/modules/cmos/cmos.c =================================================================== --- trunk.orig/src/modules/cmos/cmos.c +++ trunk/src/modules/cmos/cmos.c @@ -61,7 +61,7 @@ static byte read_month(void); static word read_year(void); static byte read_weekday(void); -static void refresh(); +static void refresh(void); // Uhrzeit Index: trunk/src/modules/floppy/floppy.c =================================================================== --- trunk.orig/src/modules/floppy/floppy.c +++ trunk/src/modules/floppy/floppy.c @@ -135,16 +135,16 @@ byte floppy_irq_cnt = 0; // Diskettenlaufwerk zugegriffen wird. lock_t floppy_lock = 0; -void floppy_init(); -void floppy_clr_irqcnt(); +void floppy_init(void); +void floppy_clr_irqcnt(void); void floppy_select_drive(byte drive); void floppy_send_byte(byte cmd); -byte floppy_read_byte(); +byte floppy_read_byte(void); void floppy_set_motor(bool state); -void floppy_irq_handler(); +void floppy_irq_handler(void); bool floppy_wait_irq(int num); -void floppy_int_sense(); -void floppy_reset(); +void floppy_int_sense(void); +void floppy_reset(void); bool floppy_recalibrate(void); bool floppy_seek(byte cylinder); bool floppy_read_sector(dword lba, void *data); @@ -157,7 +157,7 @@ size_t floppy_write_handler(lostio_file int floppy_seek_handler(lostio_filehandle_t* filehandle, uint64_t offset, int origin); -static void start_motor_shutdown_timeout(); +static void start_motor_shutdown_timeout(void); int main(int argc, char* argv[]) { @@ -283,7 +283,7 @@ int main(int argc, char* argv[]) static FILE* dma_handle = NULL; static bool dma_handle_read = TRUE; -void motor_shutdown() +void motor_shutdown(void) { if (locked(&floppy_lock)) { return; @@ -321,7 +321,7 @@ static void start_motor_shutdown_timeout } } -static FILE* get_dma_read_handle() +static FILE* get_dma_read_handle(void) { // FIXME else-Zweig fehlt, der eine neue �ertragung initialisiert dma_handle_read = FALSE; @@ -336,7 +336,7 @@ static FILE* get_dma_read_handle() return dma_handle; } -static FILE* get_dma_write_handle() +static FILE* get_dma_write_handle(void) { // FIXME else-Zweig fehlt, der eine neue �ertragung initialisiert dma_handle_read = TRUE; Index: trunk/src/modules/include/io.h =================================================================== --- trunk.orig/src/modules/include/io.h +++ trunk/src/modules/include/io.h @@ -53,7 +53,7 @@ typedef struct #ifdef MODULE_INIT - void io_init(); + void io_init(void); void rpc_io_open(pid_t pid, dword correlation_id, size_t data_size, void* data); #else Index: trunk/src/modules/init/init.c =================================================================== --- trunk.orig/src/modules/init/init.c +++ trunk/src/modules/init/init.c @@ -55,7 +55,7 @@ #define PAGE_ALIGN_ROUND_UP(n) (((n) + ~PAGE_MASK) & PAGE_MASK) #define PAGE_ALIGN_ROUND_DOWN(n) ((n) & PAGE_MASK) -int main() { return 0; } +int main(void) { return 0; } struct service_s { @@ -75,12 +75,12 @@ void rpc_loadelf(pid_t pid, dword correl void load_modules(init_module_list_t* modules); bool load_single_module(Elf32_Ehdr* elf_header, char* args, pid_t parent_pid); bool start_program(char* path, char* args, pid_t parent_pid); -extern void init_sync_messages(); +extern void init_sync_messages(void); struct service_s* get_service_by_name(const char* name); struct service_s* get_service_by_pid(pid_t pid); -extern void init_envvars(); +extern void init_envvars(void); list_t* service_list; Index: trunk/src/modules/kbc/mouse.h =================================================================== --- trunk.orig/src/modules/kbc/mouse.h +++ trunk/src/modules/kbc/mouse.h @@ -7,10 +7,10 @@ void mouse_init(void); void mouse_wait(byte a_type); void mouse_write(byte a_write); -byte mouse_read(); -void mouse_install(); +byte mouse_read(void); +void mouse_install(void); -void mouse_irq_handler(); +void mouse_irq_handler(void); size_t mouse_read_handler(lostio_filehandle_t* filehandle, void* buf, size_t blocksize, size_t blockcount); @@ -18,6 +18,6 @@ size_t mouse_read_handler(lostio_filehan size_t mouse_callback_handler(lostio_filehandle_t *file, size_t blocksize, size_t blockcount, void *data); -void mouse_input_reset(); +void mouse_input_reset(void); #endif Index: trunk/src/modules/pci/include/pcihw.h =================================================================== --- trunk.orig/src/modules/pci/include/pcihw.h +++ trunk/src/modules/pci/include/pcihw.h @@ -21,12 +21,12 @@ struct bar { enum { bar_mem = 0, bar_io = 1} type; }; -void pci_request_io_ports(); +void pci_request_io_ports(void); -void scanpci(); -char* pciinfo(); +void scanpci(void); +char* pciinfo(void); -void pci_request_io_ports(); +void pci_request_io_ports(void); struct bar* pci_get_bar(dword bus, dword device, dword func, dword bar_number); struct pci_device pci_get_device(dword bus, dword device, dword func); Index: trunk/src/modules/pci/pci.c =================================================================== --- trunk.orig/src/modules/pci/pci.c +++ trunk/src/modules/pci/pci.c @@ -50,7 +50,7 @@ #define LOSTIO_TYPES_PCI_DEVICE 255 -void create_device_files(); +void create_device_files(void); bool pre_open_handler(char** path, byte args, pid_t pid, io_resource_t* pipe_source); int close_handler(lostio_filehandle_t* handle); @@ -98,7 +98,7 @@ int main(int argc, char* argv[]) return 0; } -void create_device_files() +void create_device_files(void) { int i, j; struct pci_device* device; Index: trunk/src/modules/servmgr/main.c =================================================================== --- trunk.orig/src/modules/servmgr/main.c +++ trunk/src/modules/servmgr/main.c @@ -84,7 +84,7 @@ static void parse_params(int argc, char* * * @return TRUE wenn alle gestartet werden konnten, FALSE sonst. */ -static bool wait_startup_services() +static bool wait_startup_services(void) { const char* service; int i; @@ -107,7 +107,7 @@ static bool wait_startup_services() /** * Startup-Services anzeigen, die nicht gestartet wurden. */ -static void failed_startup_services() +static void failed_startup_services(void) { const char* service; int i; Index: trunk/src/modules/servmgr/servmgr.h =================================================================== --- trunk.orig/src/modules/servmgr/servmgr.h +++ trunk/src/modules/servmgr/servmgr.h @@ -101,7 +101,7 @@ bool service_start(const char* name); /** * Konfiguration der Services einlesen */ -bool config_read(); +bool config_read(void); /** * Konfiguration fuer einen Service holen @@ -113,4 +113,4 @@ struct config_service* config_service_ge /** * RPC-Interface initialisieren */ -void rpcif_init(); +void rpcif_init(void); Index: trunk/src/modules/sysinfo/include/cpuid.h =================================================================== --- trunk.orig/src/modules/sysinfo/include/cpuid.h +++ trunk/src/modules/sysinfo/include/cpuid.h @@ -105,7 +105,7 @@ typedef struct { * * @return TRUE wenn cpuid funktioniert, sonst FALSE */ -bool has_cpuid(); +bool has_cpuid(void); /** * Macht einen Aufruf an CPUID. Achtung, die Parameter werden auch zur Rueckgabe @@ -124,7 +124,7 @@ void cpuid(dword* eax, dword* ebx, dword * @see cpuid_0 * @return cpuid_0, enthaelt alle Infos von Level 0 */ -cpuid_0 cpuid_level_0(); +cpuid_0 cpuid_level_0(void); /** * Fragt CPUID Level 1 ab @@ -132,7 +132,7 @@ cpuid_0 cpuid_level_0(); * @see cpuid_1 * @return cpuid_1, enthaelt alle Infos von Level 1 (APIC Infos, Flags) */ -cpuid_1 cpuid_level_1(); +cpuid_1 cpuid_level_1(void); /** * Fragt CPUID Extended Level 0 ab @@ -140,7 +140,7 @@ cpuid_1 cpuid_level_1(); * @see cpuid_e0 * @return cpuid_e0, enthaelt alle Infos von Extended Level 0 (aehnlich Level 0) */ -cpuid_e0 cpuid_level_e0(); +cpuid_e0 cpuid_level_e0(void); /** * Fragt CPUID Extended Level 1 ab @@ -148,7 +148,7 @@ cpuid_e0 cpuid_level_e0(); * @see cpuid_e1 * @return cpuid_e1, enthaelt alle Infos von Extended Level 1 (Flags) */ -cpuid_e1 cpuid_level_e1(); +cpuid_e1 cpuid_level_e1(void); /** * Fragt CPUID Extended Level 2 bis 4 ab @@ -156,7 +156,7 @@ cpuid_e1 cpuid_level_e1(); * @see cpuid_e2_e4 * @return cpuid_e2_e4, alle Infos dieser Level ( = den Processor Brand String) */ -cpuid_e2_e4 cpuid_level_e2_e4(); +cpuid_e2_e4 cpuid_level_e2_e4(void); // Flags Level 1 - EDX - Alle CPUs Index: trunk/src/modules/sysinfo/sysinfo.c =================================================================== --- trunk.orig/src/modules/sysinfo/sysinfo.c +++ trunk/src/modules/sysinfo/sysinfo.c @@ -46,7 +46,7 @@ /** * Legt /cpu im vfstree an, und fuellt die Datei mit Inhalt. */ -void sysinfo_create_cpuid_file() +void sysinfo_create_cpuid_file(void) { char filename[] = "/cpu"; char* content = malloc(4096); Index: trunk/src/modules/testlib/test.h =================================================================== --- trunk.orig/src/modules/testlib/test.h +++ trunk/src/modules/testlib/test.h @@ -1,8 +1,8 @@ #ifndef TEST_H #define TEST_H -void passed(); -void failed(); +void passed(void); +void failed(void); void check(int condition); #endif Index: trunk/src/modules/testlib/test_fat.c =================================================================== --- trunk.orig/src/modules/testlib/test_fat.c +++ trunk/src/modules/testlib/test_fat.c @@ -7,7 +7,7 @@ unsigned long long divmod(unsigned long long dividend, unsigned int divisor, unsigned int * remainder); -void test_fat() +void test_fat(void) { FILE* f; void* buffer = mem_allocate(64 * 1024, 0); Index: trunk/src/modules/testlib/test_list.c =================================================================== --- trunk.orig/src/modules/testlib/test_list.c +++ trunk/src/modules/testlib/test_list.c @@ -3,7 +3,7 @@ #include "test.h" #include "collections.h" -void test_list() +void test_list(void) { list_t* list = NULL; Index: trunk/src/modules/testlib/test_malloc.c =================================================================== --- trunk.orig/src/modules/testlib/test_malloc.c +++ trunk/src/modules/testlib/test_malloc.c @@ -33,7 +33,7 @@ bool mem_overlaps(void* ptr, dword size) return FALSE; } -void test_malloc() +void test_malloc(void) { void* ptr; dword i; Index: trunk/src/modules/testlib/test_printf.c =================================================================== --- trunk.orig/src/modules/testlib/test_printf.c +++ trunk/src/modules/testlib/test_printf.c @@ -1,7 +1,7 @@ #include "stdio.h" // toter code. tests.c entsprechend modifizieren. -void test_printf() +void test_printf(void) { printf("TESTE PRINTF \n"); Index: trunk/src/modules/testlib/test_string.c =================================================================== --- trunk.orig/src/modules/testlib/test_string.c +++ trunk/src/modules/testlib/test_string.c @@ -2,7 +2,7 @@ #include "stdio.h" #include "test.h" -void test_strlen() +void test_strlen(void) { char * empty = ""; char * one = "1"; @@ -22,7 +22,7 @@ void test_strlen() check(strnlen(hello, 14) == 13); } -void test_strcmp() +void test_strcmp(void) { char * empty = ""; char * a = "Aepfel"; @@ -58,7 +58,7 @@ void test_strcmp() check(strncmp(d, e, 8) < 0); } -void test_string() +void test_string(void) { printf("string [1]: "); test_strlen(); Index: trunk/src/modules/testlib/tests.c =================================================================== --- trunk.orig/src/modules/testlib/tests.c +++ trunk/src/modules/testlib/tests.c @@ -1,11 +1,11 @@ #include "test.h" #include "stdio.h" -extern int test_string(); -extern int test_list(); -extern void test_malloc(); -extern void test_printf(); -extern void test_fat(); +extern int test_string(void); +extern int test_list(void); +extern void test_malloc(void); +extern void test_printf(void); +extern void test_fat(void); void passed() { Index: trunk/src/modules/vterm/vterm.h =================================================================== --- trunk.orig/src/modules/vterm/vterm.h +++ trunk/src/modules/vterm/vterm.h @@ -46,13 +46,13 @@ #define VT100_BUFFER_LEN 16 /// LostIO-Interface vorbereiten -void init_lostio_interface(); +void init_lostio_interface(void); /// Output-Treiber vorbereiten -void init_output(); +void init_output(void); /// Eingabe initialisieren -bool init_input(); +bool init_input(void); // Farbe im Videospeicher typedef union { Index: trunk/src/modules/rpcbench/rpcbench.c =================================================================== --- trunk.orig/src/modules/rpcbench/rpcbench.c +++ trunk/src/modules/rpcbench/rpcbench.c @@ -7,12 +7,12 @@ #define BLOCK_SIZE 512 -void display_usage(); +void display_usage(void); -int client(); +int client(void); void display_stats(dword time, dword data_size); -int server(); +int server(void); void server_get_data(pid_t pid, dword correlation_id, size_t data_size, void* data); void server_shutdown(pid_t pid, dword correlation_id, size_t data_size, void* data); Index: trunk/src/modules/speaker/main.c =================================================================== --- trunk.orig/src/modules/speaker/main.c +++ trunk/src/modules/speaker/main.c @@ -5,12 +5,12 @@ #include "stdio.h" #include "ports.h" -void switch_speaker_on() +void switch_speaker_on(void) { outb(0x61,inb(0x61) | 3); } -void switch_speaker_off() +void switch_speaker_off(void) { outb(0x61,inb(0x61) &~3); } Index: trunk/config.sh =================================================================== --- trunk.orig/config.sh +++ trunk/config.sh @@ -32,7 +32,7 @@ else LOST_TOOLS_AR=$COMPILER_PREFIX"ar" LOST_TOOLS_AS=$COMPILER_PREFIX"as -32" LOST_TOOLS_LD=$COMPILER_PREFIX"ld -m elf_i386" - LOST_TOOLS_GCC=$COMPILER_PREFIX"gcc -m32 -g -c -fno-stack-protector -nostdinc -fno-leading-underscore -fno-omit-frame-pointer -Wall -Werror -fno-strict-aliasing -O2 -fno-builtin -I ." + LOST_TOOLS_GCC=$COMPILER_PREFIX"gcc -m32 -g -c -fno-stack-protector -nostdinc -fno-leading-underscore -fno-omit-frame-pointer -Wall -Werror -Wstrict-prototypes -fno-strict-aliasing -O2 -fno-builtin -I ." LOST_TOOLS_GPP=$COMPILER_PREFIX"g++ -m32 -g -c -fno-stack-protector -fno-leading-underscore -fno-omit-frame-pointer -Wall -fno-strict-aliasing -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-use-cxa-atexit -O0" LOST_TOOLS_OBJCOPY=$COMPILER_PREFIX"objcopy -B i386:i386" LOST_TOOLS_STRIP=$COMPILER_PREFIX"strip -F elf32-i386"
Attachment:
pgpmg8Mcw41SE.pgp
Description: PGP signature