---
software/include.mak | 2 +-
software/libbase/blockdev.c | 2 +-
software/libbase/board.c | 4 ++--
software/libbase/console.c | 4 ++--
software/libbase/fatfs.c | 2 +-
software/libbase/libc.c | 4 ++--
software/libbase/system.c | 10 +++++-----
software/libbase/uart.c | 8 ++++----
software/libhal/brd.c | 2 +-
software/libhal/dmx.c | 2 +-
software/libhal/mem.c | 2 +-
software/libhal/pfpu.c | 4 ++--
software/libhal/snd.c | 22 +++++++++++-----------
software/libhal/tmu.c | 4 ++--
software/libhal/ukb.c | 2 +-
15 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/software/include.mak b/software/include.mak
index ef926ab..04608c5 100644
--- a/software/include.mak
+++ b/software/include.mak
@@ -38,7 +38,7 @@ INCLUDES_NOLIBC ?= -nostdinc -I$(MMDIR)/software/include/base
INCLUDES = $(INCLUDES_NOLIBC) -I$(MMDIR)/software/include -I$(MMDIR)/tools
ASFLAGS = $(INCLUDES) -nostdinc
# later: -Wmissing-prototypes
-CFLAGS = -O9 -Wall -Wstrict-prototypes \
+CFLAGS = -O9 -Wall -Wstrict-prototypes -Wold-style-definition \
-mbarrel-shift-enabled -mmultiply-enabled -mdivide-enabled \
-msign-extend-enabled -fno-builtin -fsigned-char \
-fsingle-precision-constant $(INCLUDES)
diff --git a/software/libbase/blockdev.c b/software/libbase/blockdev.c
index ec3a5a5..75963c0 100644
--- a/software/libbase/blockdev.c
+++ b/software/libbase/blockdev.c
@@ -263,7 +263,7 @@ int bd_readblock(unsigned int block, void *buffer)
return memcard_readblock(block, buffer);
}
-void bd_done()
+void bd_done(void)
{
}
diff --git a/software/libbase/board.c b/software/libbase/board.c
index 66568be..b81779e 100644
--- a/software/libbase/board.c
+++ b/software/libbase/board.c
@@ -39,12 +39,12 @@ const struct board_desc *get_board_desc_id(unsigned short
int id)
return NULL;
}
-const struct board_desc *get_board_desc()
+const struct board_desc *get_board_desc(void)
{
return get_board_desc_id(CSR_SYSTEM_ID & 0xffff);
}
-int get_pcb_revision()
+int get_pcb_revision(void)
{
int r;
unsigned int io;
diff --git a/software/libbase/console.c b/software/libbase/console.c
index 1271d27..d27bff3 100644
--- a/software/libbase/console.c
+++ b/software/libbase/console.c
@@ -44,7 +44,7 @@ static void writechar(char c)
write_hook(c);
}
-char readchar()
+char readchar(void)
{
while(1) {
if(uart_read_nonblock())
@@ -54,7 +54,7 @@ char readchar()
}
}
-int readchar_nonblock()
+int readchar_nonblock(void)
{
return (uart_read_nonblock()
|| ((read_nonblock_hook != NULL) && read_nonblock_hook()));
diff --git a/software/libbase/fatfs.c b/software/libbase/fatfs.c
index 997b737..92510cb 100644
--- a/software/libbase/fatfs.c
+++ b/software/libbase/fatfs.c
@@ -434,7 +434,7 @@ int fatfs_load(const char *filename, char *buffer, int
size, int *realsize)
return n*cluster_size;
}
-void fatfs_done()
+void fatfs_done(void)
{
bd_done();
}
diff --git a/software/libbase/libc.c b/software/libbase/libc.c
index 1e079b0..565927a 100644
--- a/software/libbase/libc.c
+++ b/software/libbase/libc.c
@@ -564,13 +564,13 @@ int sprintf(char * buf, const char *fmt, ...)
*/
static unsigned int seed;
-unsigned int rand()
+unsigned int rand(void)
{
seed = 129 * seed + 907633385;
return seed;
}
-void abort()
+void abort(void)
{
printf("Aborted.");
while(1);
diff --git a/software/libbase/system.c b/software/libbase/system.c
index a7a961b..da13f60 100644
--- a/software/libbase/system.c
+++ b/software/libbase/system.c
@@ -22,7 +22,7 @@
#include <system.h>
-void flush_cpu_icache()
+void flush_cpu_icache(void)
{
asm volatile(
"wcsr ICC, r0\n"
@@ -33,7 +33,7 @@ void flush_cpu_icache()
);
}
-void flush_cpu_dcache()
+void flush_cpu_dcache(void)
{
asm volatile(
"wcsr DCC, r0\n"
@@ -41,7 +41,7 @@ void flush_cpu_dcache()
);
}
-void flush_bridge_cache()
+void flush_bridge_cache(void)
{
volatile char *flushbase = (char *)FMLBRG_FLUSH_BASE;
int i, offset;
@@ -53,7 +53,7 @@ void flush_bridge_cache()
}
}
-__attribute__((noreturn)) void reboot()
+__attribute__((noreturn)) void reboot(void)
{
uart_force_sync(1); /* flush UART buffers */
irq_setmask(0);
@@ -70,7 +70,7 @@ static void icap_write(int val, unsigned int w)
CSR_ICAP = w;
}
-__attribute__((noreturn)) void reconf()
+__attribute__((noreturn)) void reconf(void)
{
uart_force_sync(1); /* flush UART buffers */
irq_setmask(0);
diff --git a/software/libbase/uart.c b/software/libbase/uart.c
index db585d6..dabddfe 100644
--- a/software/libbase/uart.c
+++ b/software/libbase/uart.c
@@ -45,7 +45,7 @@ static volatile int tx_cts;
static int force_sync;
-void uart_isr()
+void uart_isr(void)
{
unsigned int stat = CSR_UART_STAT;
@@ -67,7 +67,7 @@ void uart_isr()
}
/* Do not use in interrupt handlers! */
-char uart_read()
+char uart_read(void)
{
char c;
@@ -77,7 +77,7 @@ char uart_read()
return c;
}
-int uart_read_nonblock()
+int uart_read_nonblock(void)
{
return (rx_consume != rx_produce);
}
@@ -104,7 +104,7 @@ void uart_write(char c)
irq_setmask(oldmask);
}
-void uart_init()
+void uart_init(void)
{
unsigned int mask;
diff --git a/software/libhal/brd.c b/software/libhal/brd.c
index a16208a..7ab7a78 100644
--- a/software/libhal/brd.c
+++ b/software/libhal/brd.c
@@ -48,7 +48,7 @@ static void display_capabilities(void)
display_capability("Memtester ", cap & CAP_MEMTEST);
}
-void brd_init()
+void brd_init(void)
{
int rev;
char soc_version[13];
diff --git a/software/libhal/dmx.c b/software/libhal/dmx.c
index 7df4f6d..234e925 100644
--- a/software/libhal/dmx.c
+++ b/software/libhal/dmx.c
@@ -20,7 +20,7 @@
#include <hal/dmx.h>
-void dmx_init()
+void dmx_init(void)
{
int i;
diff --git a/software/libhal/mem.c b/software/libhal/mem.c
index 3a153ee..f9d576e 100644
--- a/software/libhal/mem.c
+++ b/software/libhal/mem.c
@@ -29,7 +29,7 @@ struct malloc_bank banks[1] = {
}
};
-void mem_init()
+void mem_init(void)
{
int i, n;
diff --git a/software/libhal/pfpu.c b/software/libhal/pfpu.c
index 0a54e38..5e6e84b 100644
--- a/software/libhal/pfpu.c
+++ b/software/libhal/pfpu.c
@@ -32,7 +32,7 @@ static unsigned int consume;
static unsigned int level;
static int cts;
-void pfpu_init()
+void pfpu_init(void)
{
unsigned int mask;
@@ -98,7 +98,7 @@ static void pfpu_start(struct pfpu_td *td)
CSR_PFPU_CTL = PFPU_CTL_START;
}
-void pfpu_isr()
+void pfpu_isr(void)
{
if(queue[consume]->update)
update_registers(queue[consume]->registers);
diff --git a/software/libhal/snd.c b/software/libhal/snd.c
index 2ba4fc7..8279808 100644
--- a/software/libhal/snd.c
+++ b/software/libhal/snd.c
@@ -38,7 +38,7 @@
static volatile int snd_cr_request;
static volatile int snd_cr_reply;
-void snd_init()
+void snd_init(void)
{
unsigned int codec_id;
unsigned int mask;
@@ -86,13 +86,13 @@ void snd_init()
printf("SND: initialization complete\n");
}
-void snd_isr_crrequest()
+void snd_isr_crrequest(void)
{
snd_cr_request = 1;
irq_ack(IRQ_AC97CRREQUEST);
}
-void snd_isr_crreply()
+void snd_isr_crreply(void)
{
snd_cr_reply = 1;
irq_ack(IRQ_AC97CRREPLY);
@@ -140,7 +140,7 @@ static void play_start(short *buffer)
CSR_AC97_DCTL = AC97_SCTL_EN;
}
-void snd_isr_dmar()
+void snd_isr_dmar(void)
{
/* NB. the callback can give us buffers by calling snd_play_refill() */
play_callback(play_queue[play_consume], play_user);
@@ -158,7 +158,7 @@ void snd_isr_dmar()
}
}
-void snd_play_empty()
+void snd_play_empty(void)
{
play_produce = 0;
play_consume = 0;
@@ -212,7 +212,7 @@ void snd_play_start(snd_callback callback, unsigned int
nsamples, void *user)
}
}
-void snd_play_stop()
+void snd_play_stop(void)
{
unsigned int oldmask;
@@ -224,7 +224,7 @@ void snd_play_stop()
irq_setmask(oldmask);
}
-int snd_play_active()
+int snd_play_active(void)
{
return(CSR_AC97_DCTL & AC97_SCTL_EN);
}
@@ -254,7 +254,7 @@ static void record_start(short *buffer)
CSR_AC97_UCTL = AC97_SCTL_EN;
}
-void snd_isr_dmaw()
+void snd_isr_dmaw(void)
{
flush_cpu_dcache();
@@ -277,7 +277,7 @@ void snd_isr_dmaw()
record_overrun = 1;
}
-void snd_record_empty()
+void snd_record_empty(void)
{
record_produce = 0;
record_consume = 0;
@@ -329,7 +329,7 @@ void snd_record_start(snd_callback callback, unsigned int
nsamples, void *user)
record_overrun = 1;
}
-void snd_record_stop()
+void snd_record_stop(void)
{
unsigned int oldmask;
@@ -341,7 +341,7 @@ void snd_record_stop()
irq_setmask(oldmask);
}
-int snd_record_active()
+int snd_record_active(void)
{
return(CSR_AC97_UCTL & AC97_SCTL_EN);
}
diff --git a/software/libhal/tmu.c b/software/libhal/tmu.c
index 100dbd8..5060405 100644
--- a/software/libhal/tmu.c
+++ b/software/libhal/tmu.c
@@ -37,7 +37,7 @@ static unsigned int consume;
static unsigned int level;
static int cts;
-void tmu_init()
+void tmu_init(void)
{
unsigned int mask;
@@ -90,7 +90,7 @@ static void tmu_start(struct tmu_td *td)
CSR_TMU_CTL = td->flags|TMU_CTL_START;
}
-void tmu_isr()
+void tmu_isr(void)
{
if(queue[consume]->callback)
queue[consume]->callback(queue[consume]);
diff --git a/software/libhal/ukb.c b/software/libhal/ukb.c
index ac450b7..929d8cb 100644
--- a/software/libhal/ukb.c
+++ b/software/libhal/ukb.c
@@ -133,7 +133,7 @@ static void keyboard_cb(unsigned char modifiers, unsigned
char key)
}
}
-void ukb_init()
+void ukb_init(void)
{
rx_produce = 0;
rx_consume = 0;
--
1.7.1
_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist@Freenode