diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-07-04 11:47:19 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-07-04 11:47:19 +0200 |
commit | 91f75bdf1fc2fcde9efb5de420caeacd89e2ce0e (patch) | |
tree | 2221dde6d623163f1bb0f87209c27b5171533cd0 /firmware | |
parent | 2df7aadc7a4516d50d9d453a32332c14d81a7c0f (diff) | |
download | picorv32-91f75bdf1fc2fcde9efb5de420caeacd89e2ce0e.tar.gz picorv32-91f75bdf1fc2fcde9efb5de420caeacd89e2ce0e.zip |
Turned gcc warnings up to eleven
Patch by Larry Doolittle
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/firmware.h | 6 | ||||
-rw-r--r-- | firmware/irq.c | 2 | ||||
-rw-r--r-- | firmware/multest.c | 6 | ||||
-rw-r--r-- | firmware/sieve.c | 4 | ||||
-rw-r--r-- | firmware/stats.c | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/firmware/firmware.h b/firmware/firmware.h index f243f31..ce5e321 100644 --- a/firmware/firmware.h +++ b/firmware/firmware.h @@ -21,16 +21,16 @@ void print_dec(unsigned int val); void print_hex(unsigned int val); // sieve.c -void sieve(); +void sieve(void); // multest.c uint32_t hard_mul(uint32_t a, uint32_t b); uint32_t hard_mulh(uint32_t a, uint32_t b); uint32_t hard_mulhsu(uint32_t a, uint32_t b); uint32_t hard_mulhu(uint32_t a, uint32_t b); -void multest(); +void multest(void); // stats.c -void stats(); +void stats(void); #endif diff --git a/firmware/irq.c b/firmware/irq.c index 2d76b1a..2dff1b0 100644 --- a/firmware/irq.c +++ b/firmware/irq.c @@ -109,7 +109,7 @@ uint32_t *irq(uint32_t *regs, uint32_t irqs) print_dec(timer_irq_count); print_str("\n"); - __asm__("sbreak"); + __asm__ volatile ("sbreak"); } return regs; diff --git a/firmware/multest.c b/firmware/multest.c index 508ed36..c6323ec 100644 --- a/firmware/multest.c +++ b/firmware/multest.c @@ -7,7 +7,7 @@ #include "firmware.h" -uint32_t xorshift32() { +static uint32_t xorshift32(void) { static uint32_t x = 314159265; x ^= x << 13; x ^= x >> 17; @@ -15,7 +15,7 @@ uint32_t xorshift32() { return x; } -void multest() +void multest(void) { int i; for (i = 0; i < 10; i++) @@ -76,7 +76,7 @@ void multest() if (s_mul != h_mul || s_mulh != h_mulh || s_mulhsu != h_mulhsu || s_mulhu != h_mulhu) { print_str("ERROR!\n"); - asm volatile ("sbreak"); + __asm__ volatile ("sbreak"); return; } diff --git a/firmware/sieve.c b/firmware/sieve.c index 73550c8..20a45d8 100644 --- a/firmware/sieve.c +++ b/firmware/sieve.c @@ -52,7 +52,7 @@ static void print_prime(int idx, int val) hash = mkhash(hash, val); } -void sieve() +void sieve(void) { int i, j, k; int idx = 1; @@ -79,7 +79,7 @@ void sieve() print_str(" OK\n"); } else { print_str(" ERROR\n"); - asm volatile ("sbreak"); + __asm__ volatile ("sbreak"); } } diff --git a/firmware/stats.c b/firmware/stats.c index e0b6f6a..4a06751 100644 --- a/firmware/stats.c +++ b/firmware/stats.c @@ -25,10 +25,10 @@ static void stats_print_dec(unsigned int val, int digits, bool zero_pad) } } -void stats() +void stats(void) { unsigned int num_cycles, num_instr; - asm("rdcycle %0; rdinstret %1;" : "=r"(num_cycles), "=r"(num_instr)); + __asm__("rdcycle %0; rdinstret %1;" : "=r"(num_cycles), "=r"(num_instr)); print_str("Cycle counter ........"); stats_print_dec(num_cycles, 8, false); print_str("\nInstruction counter .."); |