diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-11-28 11:35:08 +0100 |
---|---|---|
committer | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-12-20 17:56:34 +0100 |
commit | 33bb95bab24d2dca03ee9e641d0e98d9fbd86fdd (patch) | |
tree | eca73c12131b0765e3dfb9fe33a4df2397e932bd /rtas | |
parent | ec10f8af354266ba2576cfcc7d0c443a0cdbd7e9 (diff) | |
download | SLOF-33bb95bab24d2dca03ee9e641d0e98d9fbd86fdd.zip SLOF-33bb95bab24d2dca03ee9e641d0e98d9fbd86fdd.tar.gz SLOF-33bb95bab24d2dca03ee9e641d0e98d9fbd86fdd.tar.bz2 |
Silenced some compiler warnings that occur when compiling with prototype checks
The compiler flags -Wmissing-prototypes and -Wstrict-prototypes generally help
to write code with proper prototypes. This way one can avoid some ugly bugs
because it helps to identify functions that do not have prototypes in headers.
It also helps to improve performance since local functions then have to be
declared "static", so the compiler can do better optimizations.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'rtas')
-rw-r--r-- | rtas/flash/block_lists.c | 7 | ||||
-rw-r--r-- | rtas/flash/block_lists.h | 2 | ||||
-rw-r--r-- | rtas/rtas_call.c | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/rtas/flash/block_lists.c b/rtas/flash/block_lists.c index 4c08e3f..e632fd0 100644 --- a/rtas/flash/block_lists.c +++ b/rtas/flash/block_lists.c @@ -12,6 +12,7 @@ #include <product.h> #include <stdio.h> +#include "block_lists.h" unsigned char sig_org[] = FLASHFS_PLATFORM_MAGIC; @@ -25,7 +26,7 @@ void write_flash(unsigned long, unsigned short *); int progress = 0; int -print_progress() +print_progress(void) { static int i = 3; switch (i--) { @@ -47,13 +48,13 @@ print_progress() } void -print_hash() +print_hash(void) { printf("\b# "); } void -print_writing() +print_writing(void) { int counter = 42; printf("\nWriting Flash: |"); diff --git a/rtas/flash/block_lists.h b/rtas/flash/block_lists.h index 80044c3..b24b650 100644 --- a/rtas/flash/block_lists.h +++ b/rtas/flash/block_lists.h @@ -13,7 +13,7 @@ extern int progress; extern unsigned char sig_org[]; -void print_progress(void); +int print_progress(void); void print_hash(void); int get_block_list_version(unsigned char *); int image_check_crc(unsigned long *, int); diff --git a/rtas/rtas_call.c b/rtas/rtas_call.c index bf1cf89..8c7532c 100644 --- a/rtas/rtas_call.c +++ b/rtas/rtas_call.c @@ -28,6 +28,10 @@ int rtas_callcount[0x40] __attribute__((aligned (16))); long rtas_config; +/* Prototype */ +void rtas_call (rtas_args_t *rtas_args); + + /* Function: rtas_call Input: |