Skip to content

Commit 533b374

Browse files
author
Sebastien Bourdeauducq
committedDec 15, 2011
Fix new compiler warnings
1 parent c01bb2f commit 533b374

14 files changed

+40
-40
lines changed
 

‎src/main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <console.h>
2424
#include "testdefs.h"
2525

26-
void isr()
26+
void isr(void)
2727
{
2828
unsigned int irqs;
2929

@@ -191,7 +191,7 @@ static void print_summary(struct test_category *cat)
191191
printf("******** THERE WERE SOME SKIPPED TESTS ********\n");
192192
}
193193

194-
int main()
194+
int main(void)
195195
{
196196
char c;
197197
int i;

‎src/testdefs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ enum {
2424
TEST_STATUS_PASSED
2525
};
2626

27-
typedef int (*testfun)();
27+
typedef int (*testfun)(void);
2828

2929
struct test_description {
3030
char *name;

‎src/tests_audio.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static int snd_ac97_write(unsigned int addr, unsigned int value)
5858
return 1;
5959
}
6060

61-
static int codecprobe()
61+
static int codecprobe(void)
6262
{
6363
int reg;
6464

@@ -75,7 +75,7 @@ static int codecprobe()
7575
return TEST_STATUS_PASSED;
7676
}
7777

78-
static int lineout()
78+
static int lineout(void)
7979
{
8080
unsigned short v;
8181
static unsigned short test_tone[2*48000];
@@ -109,7 +109,7 @@ static int lineout()
109109
}
110110
}
111111

112-
static int input_test()
112+
static int input_test(void)
113113
{
114114
static unsigned short buffer[AC97_MAX_DMASIZE/2];
115115
char c;
@@ -141,7 +141,7 @@ static int input_test()
141141
}
142142
}
143143

144-
static int microphone()
144+
static int microphone(void)
145145
{
146146
int r;
147147
if(!snd_ac97_write(0x0e, 0x0000)) return TEST_STATUS_FAILED; /* mic volume */
@@ -152,7 +152,7 @@ static int microphone()
152152
return r;
153153
}
154154

155-
static int linein()
155+
static int linein(void)
156156
{
157157
int r;
158158
if(!snd_ac97_write(0x10, 0x0000)) return TEST_STATUS_FAILED; /* line in volume */

‎src/tests_dmx.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <hw/sysctl.h>
2121
#include "testdefs.h"
2222

23-
static int loopback()
23+
static int loopback(void)
2424
{
2525
unsigned int i;
2626

‎src/tests_ethernet.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <net/microudp.h>
2222
#include "testdefs.h"
2323

24-
static int mdio()
24+
static int mdio(void)
2525
{
2626
int r;
2727
r = mdio_read(0x01, 0x02);
@@ -33,7 +33,7 @@ static int mdio()
3333
}
3434
}
3535

36-
static int arp_resolution()
36+
static int arp_resolution(void)
3737
{
3838
microudp_start((unsigned char *)FLASH_OFFSET_MAC_ADDRESS, IPTOINT(192, 168, 0, 42));
3939
if(!microudp_arp_resolve(IPTOINT(192, 168, 0, 14)))

‎src/tests_gpio.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -69,27 +69,27 @@ static int generic_led(unsigned int l)
6969
}
7070
}
7171

72-
static int sw1()
72+
static int sw1(void)
7373
{
7474
return generic_sw(GPIO_BTN1);
7575
}
7676

77-
static int sw2()
77+
static int sw2(void)
7878
{
7979
return generic_sw(GPIO_BTN2);
8080
}
8181

82-
static int sw3()
82+
static int sw3(void)
8383
{
8484
return generic_sw(GPIO_BTN3);
8585
}
8686

87-
static int led2()
87+
static int led2(void)
8888
{
8989
return generic_led(GPIO_LED1);
9090
}
9191

92-
static int led3()
92+
static int led3(void)
9393
{
9494
return generic_led(GPIO_LED2);
9595
}

‎src/tests_images.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ extern unsigned int _edata;
6262

6363
#define IMAGES_COUNT 9
6464

65-
static int compare_loop()
65+
static int compare_loop(void)
6666
{
6767
int i, ret, count;
6868

‎src/tests_ir.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <hw/interrupts.h>
2323
#include "testdefs.h"
2424

25-
static int reception()
25+
static int reception(void)
2626
{
2727
char c;
2828
int pre_rx,i,rx;

‎src/tests_memorycard.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
#include "testdefs.h"
2121

2222
int bd_initialized;
23-
static int cardinit()
23+
static int cardinit(void)
2424
{
2525
if(!bd_init(BLOCKDEV_MEMORY_CARD))
2626
return TEST_STATUS_FAILED;
2727
bd_initialized = 1;
2828
return TEST_STATUS_PASSED;
2929
}
3030

31-
static int blkread()
31+
static int blkread(void)
3232
{
3333
unsigned char buffer[512];
3434
unsigned short eos;

‎src/tests_midi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <hw/interrupts.h>
2323
#include "testdefs.h"
2424

25-
static int loopback()
25+
static int loopback(void)
2626
{
2727
unsigned int c = 0;
2828
char e;

‎src/tests_sdram.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <stdio.h>
2020
#include "testdefs.h"
2121

22-
static void flush_caches()
22+
static void flush_caches(void)
2323
{
2424
asm volatile(
2525
"wcsr DCC, r0\n"
@@ -28,7 +28,7 @@ static void flush_caches()
2828
flush_bridge_cache();
2929
}
3030

31-
static int a8()
31+
static int a8(void)
3232
{
3333
unsigned int adr1, adr2;
3434
int j;
@@ -62,14 +62,14 @@ static int test_a(unsigned int a)
6262
return TEST_STATUS_PASSED;
6363
}
6464

65-
static int a9() { return test_a(9); }
66-
static int a10() { return test_a(10); }
67-
static int a11() { return test_a(11); }
68-
static int a12() { return test_a(12); }
65+
static int a9(void) { return test_a(9); }
66+
static int a10(void) { return test_a(10); }
67+
static int a11(void) { return test_a(11); }
68+
static int a12(void) { return test_a(12); }
6969

7070
#define TEST_WORDS (512*1024)
7171

72-
static int random()
72+
static int random(void)
7373
{
7474
unsigned int test_buffer[TEST_WORDS];
7575
int i, j;
@@ -92,7 +92,7 @@ static int random()
9292
return TEST_STATUS_PASSED;
9393
}
9494

95-
static int hammer()
95+
static int hammer(void)
9696
{
9797
unsigned int test_buffer[TEST_WORDS];
9898
int i, j;
@@ -108,7 +108,7 @@ static int hammer()
108108
return TEST_STATUS_PASSED;
109109
}
110110

111-
static int crosstalk()
111+
static int crosstalk(void)
112112
{
113113
unsigned int test_buffer[TEST_WORDS];
114114
int i, j;

‎src/tests_usb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static void mouse_cb(unsigned char buttons, char dx, char dy, unsigned char whee
3535
success = 1;
3636
}
3737

38-
static int test_keyboard()
38+
static int test_keyboard(void)
3939
{
4040
char c;
4141

‎src/tests_vga.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
static int i2c_started;
2424

25-
static int i2c_init()
25+
static int i2c_init(void)
2626
{
2727
unsigned int timeout;
2828

@@ -35,15 +35,15 @@ static int i2c_init()
3535
return timeout;
3636
}
3737

38-
static void i2c_delay()
38+
static void i2c_delay(void)
3939
{
4040
unsigned int i;
4141

4242
for(i=0;i<1000;i++) __asm__("nop");
4343
}
4444

4545
/* I2C bit-banging functions from http://en.wikipedia.org/wiki/I2c */
46-
static unsigned int i2c_read_bit()
46+
static unsigned int i2c_read_bit(void)
4747
{
4848
unsigned int bit;
4949

@@ -71,7 +71,7 @@ static void i2c_write_bit(unsigned int bit)
7171
CSR_VGA_DDC &= ~VGA_DDC_SDC;
7272
}
7373

74-
static void i2c_start_cond()
74+
static void i2c_start_cond(void)
7575
{
7676
if(i2c_started) {
7777
/* set SDA to 1 */
@@ -87,7 +87,7 @@ static void i2c_start_cond()
8787
i2c_started = 1;
8888
}
8989

90-
static void i2c_stop_cond()
90+
static void i2c_stop_cond(void)
9191
{
9292
/* set SDA to 0 */
9393
CSR_VGA_DDC = VGA_DDC_SDAOE;
@@ -152,7 +152,7 @@ static int vga_read_edid(char *buffer)
152152
return 1;
153153
}
154154

155-
static int ddc()
155+
static int ddc(void)
156156
{
157157
unsigned int buffer[64];
158158

@@ -175,7 +175,7 @@ static int ddc()
175175
#define MAKERGB565(r, g, b) ((((r) & 0x1f) << RSHIFT) | (((g) & 0x3f) << GSHIFT) | (((b) & 0x1f) << BSHIFT))
176176

177177
short int fb[640*480] __attribute__((aligned(32)));
178-
static int testcard()
178+
static int testcard(void)
179179
{
180180
unsigned int x, y;
181181
unsigned int r, g, b;

‎src/tests_videoin.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <system.h>
2525
#include "testdefs.h"
2626

27-
static int decoder_probe()
27+
static int decoder_probe(void)
2828
{
2929
int reg;
3030

@@ -41,7 +41,7 @@ static int decoder_probe()
4141
/* Must be run after the VGA test to initialize the frambuffer! */
4242
extern short int fb[];
4343
static short vbuffer[720*288] __attribute__((aligned(32)));
44-
static int capture()
44+
static int capture(void)
4545
{
4646
int x, y;
4747
char c;

0 commit comments

Comments
 (0)
Please sign in to comment.