From a6fc3346532cbbad34e48895546f70a2b5f8f071 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Sat, 26 Jul 2014 03:33:19 +0000 Subject: [PATCH] Eliminate "no previous prototype for main" warnings. --- sys/boot/arm/at91/boot0/main.c | 2 ++ sys/boot/arm/at91/boot0iic/main.c | 2 ++ sys/boot/arm/at91/boot0spi/main.c | 5 ++++- sys/boot/arm/at91/boot2/boot2.c | 2 ++ sys/boot/arm/at91/bootiic/main.c | 2 ++ sys/boot/arm/at91/bootspi/main.c | 2 ++ 6 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/boot/arm/at91/boot0/main.c b/sys/boot/arm/at91/boot0/main.c index 4bc7fc6ea90a..36dfe821444d 100644 --- a/sys/boot/arm/at91/boot0/main.c +++ b/sys/boot/arm/at91/boot0/main.c @@ -30,6 +30,8 @@ typedef void fn_t(void); +int main(void); + int main(void) { diff --git a/sys/boot/arm/at91/boot0iic/main.c b/sys/boot/arm/at91/boot0iic/main.c index 7d0e9d319e78..2a81b937ae69 100644 --- a/sys/boot/arm/at91/boot0iic/main.c +++ b/sys/boot/arm/at91/boot0iic/main.c @@ -28,6 +28,8 @@ #include "lib.h" #include "at91rm9200_lowlevel.h" +int main(void); + int main(void) { diff --git a/sys/boot/arm/at91/boot0spi/main.c b/sys/boot/arm/at91/boot0spi/main.c index 4d03b26fe0d2..cac037b5b0af 100644 --- a/sys/boot/arm/at91/boot0spi/main.c +++ b/sys/boot/arm/at91/boot0spi/main.c @@ -31,7 +31,9 @@ #define OFFSET 0 -void +int main(void); + +int main(void) { int len, i, j, off, sec; @@ -59,4 +61,5 @@ main(void) continue; printf("Done\n"); reset(); + return (1); } diff --git a/sys/boot/arm/at91/boot2/boot2.c b/sys/boot/arm/at91/boot2/boot2.c index c3629a522c7b..772ccbe76483 100644 --- a/sys/boot/arm/at91/boot2/boot2.c +++ b/sys/boot/arm/at91/boot2/boot2.c @@ -93,6 +93,7 @@ static char kname[1024]; static uint32_t opts; static uint8_t dsk_meta; +int main(void); static void load(void); static int parse(void); static int dskread(void *, unsigned, unsigned); @@ -190,6 +191,7 @@ main(void) else load(); } + return (1); } static void diff --git a/sys/boot/arm/at91/bootiic/main.c b/sys/boot/arm/at91/bootiic/main.c index b2b6e39041e5..86368358ce8a 100644 --- a/sys/boot/arm/at91/bootiic/main.c +++ b/sys/boot/arm/at91/bootiic/main.c @@ -28,6 +28,8 @@ #include "emac.h" #include "lib.h" +int main(void); + /* * .KB_C_FN_DEFINITION_START * int main(void) diff --git a/sys/boot/arm/at91/bootspi/main.c b/sys/boot/arm/at91/bootspi/main.c index c15dabc636f5..cb9d1dbc4225 100644 --- a/sys/boot/arm/at91/bootspi/main.c +++ b/sys/boot/arm/at91/bootspi/main.c @@ -43,6 +43,8 @@ #include "spi_flash.h" #include "ee.h" +int main(void); + int main(void) {