Navigation Menu

Skip to content

Commit

Permalink
Fix new compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Bourdeauducq committed Dec 15, 2011
1 parent c01bb2f commit 533b374
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 40 deletions.
4 changes: 2 additions & 2 deletions src/main.c
Expand Up @@ -23,7 +23,7 @@
#include <console.h>
#include "testdefs.h"

void isr()
void isr(void)
{
unsigned int irqs;

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

int main()
int main(void)
{
char c;
int i;
Expand Down
2 changes: 1 addition & 1 deletion src/testdefs.h
Expand Up @@ -24,7 +24,7 @@ enum {
TEST_STATUS_PASSED
};

typedef int (*testfun)();
typedef int (*testfun)(void);

struct test_description {
char *name;
Expand Down
10 changes: 5 additions & 5 deletions src/tests_audio.c
Expand Up @@ -58,7 +58,7 @@ static int snd_ac97_write(unsigned int addr, unsigned int value)
return 1;
}

static int codecprobe()
static int codecprobe(void)
{
int reg;

Expand All @@ -75,7 +75,7 @@ static int codecprobe()
return TEST_STATUS_PASSED;
}

static int lineout()
static int lineout(void)
{
unsigned short v;
static unsigned short test_tone[2*48000];
Expand Down Expand Up @@ -109,7 +109,7 @@ static int lineout()
}
}

static int input_test()
static int input_test(void)
{
static unsigned short buffer[AC97_MAX_DMASIZE/2];
char c;
Expand Down Expand Up @@ -141,7 +141,7 @@ static int input_test()
}
}

static int microphone()
static int microphone(void)
{
int r;
if(!snd_ac97_write(0x0e, 0x0000)) return TEST_STATUS_FAILED; /* mic volume */
Expand All @@ -152,7 +152,7 @@ static int microphone()
return r;
}

static int linein()
static int linein(void)
{
int r;
if(!snd_ac97_write(0x10, 0x0000)) return TEST_STATUS_FAILED; /* line in volume */
Expand Down
2 changes: 1 addition & 1 deletion src/tests_dmx.c
Expand Up @@ -20,7 +20,7 @@
#include <hw/sysctl.h>
#include "testdefs.h"

static int loopback()
static int loopback(void)
{
unsigned int i;

Expand Down
4 changes: 2 additions & 2 deletions src/tests_ethernet.c
Expand Up @@ -21,7 +21,7 @@
#include <net/microudp.h>
#include "testdefs.h"

static int mdio()
static int mdio(void)
{
int r;
r = mdio_read(0x01, 0x02);
Expand All @@ -33,7 +33,7 @@ static int mdio()
}
}

static int arp_resolution()
static int arp_resolution(void)
{
microudp_start((unsigned char *)FLASH_OFFSET_MAC_ADDRESS, IPTOINT(192, 168, 0, 42));
if(!microudp_arp_resolve(IPTOINT(192, 168, 0, 14)))
Expand Down
10 changes: 5 additions & 5 deletions src/tests_gpio.c
Expand Up @@ -69,27 +69,27 @@ static int generic_led(unsigned int l)
}
}

static int sw1()
static int sw1(void)
{
return generic_sw(GPIO_BTN1);
}

static int sw2()
static int sw2(void)
{
return generic_sw(GPIO_BTN2);
}

static int sw3()
static int sw3(void)
{
return generic_sw(GPIO_BTN3);
}

static int led2()
static int led2(void)
{
return generic_led(GPIO_LED1);
}

static int led3()
static int led3(void)
{
return generic_led(GPIO_LED2);
}
Expand Down
2 changes: 1 addition & 1 deletion src/tests_images.c
Expand Up @@ -62,7 +62,7 @@ extern unsigned int _edata;

#define IMAGES_COUNT 9

static int compare_loop()
static int compare_loop(void)
{
int i, ret, count;

Expand Down
2 changes: 1 addition & 1 deletion src/tests_ir.c
Expand Up @@ -22,7 +22,7 @@
#include <hw/interrupts.h>
#include "testdefs.h"

static int reception()
static int reception(void)
{
char c;
int pre_rx,i,rx;
Expand Down
4 changes: 2 additions & 2 deletions src/tests_memorycard.c
Expand Up @@ -20,15 +20,15 @@
#include "testdefs.h"

int bd_initialized;
static int cardinit()
static int cardinit(void)
{
if(!bd_init(BLOCKDEV_MEMORY_CARD))
return TEST_STATUS_FAILED;
bd_initialized = 1;
return TEST_STATUS_PASSED;
}

static int blkread()
static int blkread(void)
{
unsigned char buffer[512];
unsigned short eos;
Expand Down
2 changes: 1 addition & 1 deletion src/tests_midi.c
Expand Up @@ -22,7 +22,7 @@
#include <hw/interrupts.h>
#include "testdefs.h"

static int loopback()
static int loopback(void)
{
unsigned int c = 0;
char e;
Expand Down
18 changes: 9 additions & 9 deletions src/tests_sdram.c
Expand Up @@ -19,7 +19,7 @@
#include <stdio.h>
#include "testdefs.h"

static void flush_caches()
static void flush_caches(void)
{
asm volatile(
"wcsr DCC, r0\n"
Expand All @@ -28,7 +28,7 @@ static void flush_caches()
flush_bridge_cache();
}

static int a8()
static int a8(void)
{
unsigned int adr1, adr2;
int j;
Expand Down Expand Up @@ -62,14 +62,14 @@ static int test_a(unsigned int a)
return TEST_STATUS_PASSED;
}

static int a9() { return test_a(9); }
static int a10() { return test_a(10); }
static int a11() { return test_a(11); }
static int a12() { return test_a(12); }
static int a9(void) { return test_a(9); }
static int a10(void) { return test_a(10); }
static int a11(void) { return test_a(11); }
static int a12(void) { return test_a(12); }

#define TEST_WORDS (512*1024)

static int random()
static int random(void)
{
unsigned int test_buffer[TEST_WORDS];
int i, j;
Expand All @@ -92,7 +92,7 @@ static int random()
return TEST_STATUS_PASSED;
}

static int hammer()
static int hammer(void)
{
unsigned int test_buffer[TEST_WORDS];
int i, j;
Expand All @@ -108,7 +108,7 @@ static int hammer()
return TEST_STATUS_PASSED;
}

static int crosstalk()
static int crosstalk(void)
{
unsigned int test_buffer[TEST_WORDS];
int i, j;
Expand Down
2 changes: 1 addition & 1 deletion src/tests_usb.c
Expand Up @@ -35,7 +35,7 @@ static void mouse_cb(unsigned char buttons, char dx, char dy, unsigned char whee
success = 1;
}

static int test_keyboard()
static int test_keyboard(void)
{
char c;

Expand Down
14 changes: 7 additions & 7 deletions src/tests_vga.c
Expand Up @@ -22,7 +22,7 @@

static int i2c_started;

static int i2c_init()
static int i2c_init(void)
{
unsigned int timeout;

Expand All @@ -35,15 +35,15 @@ static int i2c_init()
return timeout;
}

static void i2c_delay()
static void i2c_delay(void)
{
unsigned int i;

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

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

Expand Down Expand Up @@ -71,7 +71,7 @@ static void i2c_write_bit(unsigned int bit)
CSR_VGA_DDC &= ~VGA_DDC_SDC;
}

static void i2c_start_cond()
static void i2c_start_cond(void)
{
if(i2c_started) {
/* set SDA to 1 */
Expand All @@ -87,7 +87,7 @@ static void i2c_start_cond()
i2c_started = 1;
}

static void i2c_stop_cond()
static void i2c_stop_cond(void)
{
/* set SDA to 0 */
CSR_VGA_DDC = VGA_DDC_SDAOE;
Expand Down Expand Up @@ -152,7 +152,7 @@ static int vga_read_edid(char *buffer)
return 1;
}

static int ddc()
static int ddc(void)
{
unsigned int buffer[64];

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

short int fb[640*480] __attribute__((aligned(32)));
static int testcard()
static int testcard(void)
{
unsigned int x, y;
unsigned int r, g, b;
Expand Down
4 changes: 2 additions & 2 deletions src/tests_videoin.c
Expand Up @@ -24,7 +24,7 @@
#include <system.h>
#include "testdefs.h"

static int decoder_probe()
static int decoder_probe(void)
{
int reg;

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

0 comments on commit 533b374

Please sign in to comment.