From 1da4faa8960f18f9a1c17a5b8f6227b2efd3f57f Mon Sep 17 00:00:00 2001 From: Marty Connor Date: Wed, 27 Sep 2006 04:04:55 +0000 Subject: [PATCH] include stdio.h to suppress printf warning, general warnings fixups --- src/core/buffer.c | 1 + src/core/dev.c | 2 +- src/core/device.c | 1 + src/core/main.c | 8 +++++--- src/core/malloc.c | 2 ++ src/core/osloader.c | 1 + 6 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/core/buffer.c b/src/core/buffer.c index 5c31ff8de..df08b66d9 100644 --- a/src/core/buffer.c +++ b/src/core/buffer.c @@ -38,6 +38,7 @@ * */ +#include "stdio.h" #include "stddef.h" #include "string.h" #include "io.h" diff --git a/src/core/dev.c b/src/core/dev.c index f03965d25..3d1fdd91c 100644 --- a/src/core/dev.c +++ b/src/core/dev.c @@ -132,7 +132,7 @@ int find_by_driver ( struct bus_loc *bus_loc, struct bus_dev *bus_dev, return 1; } while ( bus_driver->next_location ( bus_loc ) ); - DBG ( "DEV found no device for driver %s\n" ); + DBG ( "DEV found no device for driver %s\n", device_driver->name ); return 0; } diff --git a/src/core/device.c b/src/core/device.c index e54ab2970..dfbb997ec 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -19,6 +19,7 @@ #include #include #include +#include "stdio.h" /** * @file diff --git a/src/core/main.c b/src/core/main.c index 30839401d..e1ddc9dda 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -134,13 +134,15 @@ operations[] = { #endif - - +#if 0 static int main_loop(int state); static int exit_ok; -static int exit_status; static int initialized; +#endif +static int exit_status; + +void test_dhcp ( struct net_device *netdev ); /************************************************************************** MAIN - Kick off routine diff --git a/src/core/malloc.c b/src/core/malloc.c index bf4a8a396..14e54976a 100644 --- a/src/core/malloc.c +++ b/src/core/malloc.c @@ -16,6 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -77,6 +78,7 @@ void * alloc_memblock ( size_t size, size_t align ) { */ size = ( size + MIN_MEMBLOCK_SIZE - 1 ) & ~( MIN_MEMBLOCK_SIZE - 1 ); align_mask = ( align - 1 ) | ( MIN_MEMBLOCK_SIZE - 1 ); + DBG ( "Allocating %#zx (aligned %#zx)\n", size, align ); /* Search through blocks for the first one with enough space */ diff --git a/src/core/osloader.c b/src/core/osloader.c index ddbe68a3a..09d671a0e 100644 --- a/src/core/osloader.c +++ b/src/core/osloader.c @@ -29,6 +29,7 @@ Modifications: Ken Yap (for Etherboot/16) * your option) any later version. */ +#include "stdio.h" #include "io.h" #include "memsizes.h"