diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-10-17 11:07:15 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-10-17 11:07:15 +0000 |
commit | e9d7b9de5705a3b5c0b822077fbd165c86087481 (patch) | |
tree | fc6a51fec7f88d34acfeb79df63cc8a4d9a10f54 /demos | |
parent | 26ed3732876a649fb02a83e768e4392034d65653 (diff) | |
download | ChibiOS-e9d7b9de5705a3b5c0b822077fbd165c86087481.tar.gz ChibiOS-e9d7b9de5705a3b5c0b822077fbd165c86087481.tar.bz2 ChibiOS-e9d7b9de5705a3b5c0b822077fbd165c86087481.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1230 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r-- | demos/ARM7-LPC214x-G++/Makefile | 4 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-G++/main.cpp | 4 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC-minimal/Makefile | 4 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC-minimal/main.c | 5 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/Makefile | 4 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/buzzer.c | 5 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/main.c | 8 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/mmcsd.c | 1 | ||||
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/Makefile | 4 | ||||
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/main.c | 4 | ||||
-rw-r--r-- | demos/MSP430-MSP430x1611-GCC/Makefile | 4 | ||||
-rw-r--r-- | demos/MSP430-MSP430x1611-GCC/main.c | 4 | ||||
-rw-r--r-- | demos/Win32-MinGW/Makefile | 2 | ||||
-rw-r--r-- | demos/Win32-MinGW/chcore.c | 3 | ||||
-rw-r--r-- | demos/Win32-MinGW/main.c | 6 |
15 files changed, 46 insertions, 16 deletions
diff --git a/demos/ARM7-LPC214x-G++/Makefile b/demos/ARM7-LPC214x-G++/Makefile index 3b0a8bee3..3bb33abfe 100644 --- a/demos/ARM7-LPC214x-G++/Makefile +++ b/demos/ARM7-LPC214x-G++/Makefile @@ -126,10 +126,10 @@ AOPT = TOPT = -mthumb -DTHUMB
# Define C warning options here
-CWARN = -Wall -Wstrict-prototypes
+CWARN = -Wall -Wextra -Wstrict-prototypes
# Define C++ warning options here
-CPPWARN = -Wall
+CPPWARN = -Wall -Wextra
#
# Compiler settings
diff --git a/demos/ARM7-LPC214x-G++/main.cpp b/demos/ARM7-LPC214x-G++/main.cpp index b46ccd86e..f0268045d 100644 --- a/demos/ARM7-LPC214x-G++/main.cpp +++ b/demos/ARM7-LPC214x-G++/main.cpp @@ -137,6 +137,7 @@ public: */
static void TimerHandler(eventid_t id) {
+ (void)id;
if (!(palReadPort(IOPORT1) & BOTH_BUTTONS)) { // Both buttons
TesterThread tester;
tester.Wait();
@@ -154,6 +155,9 @@ int main(int argc, char **argv) { static EvTimer evt;
struct EventListener el0;
+ (void)argc;
+ (void)argv;
+
/*
* Activates the serial driver 2 using the driver default configuration.
*/
diff --git a/demos/ARM7-LPC214x-GCC-minimal/Makefile b/demos/ARM7-LPC214x-GCC-minimal/Makefile index 5315948af..21e9a0eea 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/Makefile +++ b/demos/ARM7-LPC214x-GCC-minimal/Makefile @@ -123,10 +123,10 @@ AOPT = TOPT = -mthumb -DTHUMB
# Define C warning options here
-CWARN = -Wall -Wstrict-prototypes
+CWARN = -Wall -Wextra -Wstrict-prototypes
# Define C++ warning options here
-CPPWARN = -Wall
+CPPWARN = -Wall -Wextra
#
# Compiler settings
diff --git a/demos/ARM7-LPC214x-GCC-minimal/main.c b/demos/ARM7-LPC214x-GCC-minimal/main.c index d303237c4..7ce5ffe95 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/main.c +++ b/demos/ARM7-LPC214x-GCC-minimal/main.c @@ -28,6 +28,7 @@ static WORKING_AREA(waThread1, 128);
static msg_t Thread1(void *arg) {
+ (void)arg;
while (TRUE) {
palClearPort(IOPORT1, PAL_PORT_BIT(PA_LED2));
chThdSleepMilliseconds(200);
@@ -47,6 +48,7 @@ static msg_t Thread1(void *arg) { static WORKING_AREA(waThread2, 128);
static msg_t Thread2(void *arg) {
+ (void)arg;
while (TRUE) {
palClearPad(IOPORT1, PA_LEDUSB);
chThdSleepMilliseconds(200);
@@ -62,6 +64,9 @@ static msg_t Thread2(void *arg) { */
int main(int argc, char **argv) {
+ (void)argc;
+ (void)argv;
+
/*
* Creates the blinker threads.
*/
diff --git a/demos/ARM7-LPC214x-GCC/Makefile b/demos/ARM7-LPC214x-GCC/Makefile index 54b1e0ffd..792ff4fbd 100644 --- a/demos/ARM7-LPC214x-GCC/Makefile +++ b/demos/ARM7-LPC214x-GCC/Makefile @@ -127,10 +127,10 @@ AOPT = TOPT = -mthumb -DTHUMB
# Define C warning options here
-CWARN = -Wall -Wstrict-prototypes
+CWARN = -Wall -Wextra -Wstrict-prototypes
# Define C++ warning options here
-CPPWARN = -Wall
+CPPWARN = -Wall -Wextra
#
# Compiler settings
diff --git a/demos/ARM7-LPC214x-GCC/buzzer.c b/demos/ARM7-LPC214x-GCC/buzzer.c index 25be0e2d9..1d3350bb2 100644 --- a/demos/ARM7-LPC214x-GCC/buzzer.c +++ b/demos/ARM7-LPC214x-GCC/buzzer.c @@ -58,9 +58,8 @@ void InitBuzzer(void) { }
static void stop(void *p) {
- TC *tc = T1Base;
- StopCounter(tc);
+ StopCounter((TC *)p);
chEvtBroadcastI(&BuzzerSilentEventSource);
}
@@ -77,7 +76,7 @@ void PlaySound(int freq, systime_t duration) { tc->TC_MR0 = tc->TC_MR1 = (PCLK / (freq * 2));
StartCounter(tc);
- chVTSetI(&bvt, duration, stop, NULL);
+ chVTSetI(&bvt, duration, stop, tc);
chSysUnlock();
}
diff --git a/demos/ARM7-LPC214x-GCC/main.c b/demos/ARM7-LPC214x-GCC/main.c index a8db1b667..93b6fd768 100644 --- a/demos/ARM7-LPC214x-GCC/main.c +++ b/demos/ARM7-LPC214x-GCC/main.c @@ -35,6 +35,7 @@ static WORKING_AREA(waThread1, 128);
static msg_t Thread1(void *arg) {
+ (void)arg;
while (TRUE) {
palClearPort(IOPORT1, PAL_PORT_BIT(PA_LED2));
chThdSleepMilliseconds(200);
@@ -54,6 +55,7 @@ static msg_t Thread1(void *arg) { static WORKING_AREA(waThread2, 128);
static msg_t Thread2(void *arg) {
+ (void)arg;
while (TRUE) {
palClearPad(IOPORT1, PA_LEDUSB);
chThdSleepMilliseconds(200);
@@ -70,6 +72,7 @@ static WORKING_AREA(waTestThread, 128); */
static void TimerHandler(eventid_t id) {
+ (void)id;
if (!(palReadPort(IOPORT1) & BOTH_BUTTONS)) {
Thread *tp = chThdCreateStatic(waTestThread, sizeof(waTestThread),
NORMALPRIO, TestThread, &SD1);
@@ -94,6 +97,7 @@ static void InsertHandler(eventid_t id) { static uint8_t rwbuf[512];
MMCCSD data;
+ (void)id;
PlaySoundWait(1000, MS2ST(100));
PlaySoundWait(2000, MS2ST(100));
if (mmcInit())
@@ -111,6 +115,7 @@ static void InsertHandler(eventid_t id) { */
static void RemoveHandler(eventid_t id) {
+ (void)id;
PlaySoundWait(2000, MS2ST(100));
PlaySoundWait(1000, MS2ST(100));
}
@@ -128,6 +133,9 @@ int main(int argc, char **argv) { static EvTimer evt;
struct EventListener el0, el1, el2;
+ (void)argc;
+ (void)argv;
+
/*
* Activates the serial driver 2 using the driver default configuration.
*/
diff --git a/demos/ARM7-LPC214x-GCC/mmcsd.c b/demos/ARM7-LPC214x-GCC/mmcsd.c index aba532544..731f594a2 100644 --- a/demos/ARM7-LPC214x-GCC/mmcsd.c +++ b/demos/ARM7-LPC214x-GCC/mmcsd.c @@ -42,6 +42,7 @@ void InitMMC(void) { void tmrfunc(void *par) {
+ (void)par;
if (cnt) {
if (!palReadPad(IOPORT2, PB_CP1)) {
if (!--cnt)
diff --git a/demos/ARMCM3-STM32F103-GCC/Makefile b/demos/ARMCM3-STM32F103-GCC/Makefile index ca12fd05d..4919e567e 100644 --- a/demos/ARMCM3-STM32F103-GCC/Makefile +++ b/demos/ARMCM3-STM32F103-GCC/Makefile @@ -139,10 +139,10 @@ AOPT = TOPT = -mthumb -DTHUMB
# Define C warning options here
-CWARN = -Wall -Wstrict-prototypes
+CWARN = -Wall -Wextra -Wstrict-prototypes
# Define C++ warning options here
-CPPWARN = -Wall
+CPPWARN = -Wall -Wextra
#
# Compiler settings
diff --git a/demos/ARMCM3-STM32F103-GCC/main.c b/demos/ARMCM3-STM32F103-GCC/main.c index ca2fa842b..fcc496648 100644 --- a/demos/ARMCM3-STM32F103-GCC/main.c +++ b/demos/ARMCM3-STM32F103-GCC/main.c @@ -30,6 +30,7 @@ static WORKING_AREA(waThread1, 128);
static msg_t Thread1(void *arg) {
+ (void)arg;
while (TRUE) {
palClearPad(IOPORT3, GPIOC_LED);
chThdSleepMilliseconds(500);
@@ -45,6 +46,9 @@ static msg_t Thread1(void *arg) { */
int main(int argc, char **argv) {
+ (void)argc;
+ (void)argv;
+
/*
* Activates the serial driver 2 using the driver default configuration.
*/
diff --git a/demos/MSP430-MSP430x1611-GCC/Makefile b/demos/MSP430-MSP430x1611-GCC/Makefile index dc3747875..7a7a720a8 100644 --- a/demos/MSP430-MSP430x1611-GCC/Makefile +++ b/demos/MSP430-MSP430x1611-GCC/Makefile @@ -91,10 +91,10 @@ HEX = $(CP) -O ihex BIN = $(CP) -O binary
# Define C warning options here
-CWARN = -Wall -Wstrict-prototypes
+CWARN = -Wall -Wextra -Wstrict-prototypes
# Define C++ warning options here
-CPPWARN = -Wall
+CPPWARN = -Wall -Wextra
#
# Compiler settings
diff --git a/demos/MSP430-MSP430x1611-GCC/main.c b/demos/MSP430-MSP430x1611-GCC/main.c index 02622e817..3e729296b 100644 --- a/demos/MSP430-MSP430x1611-GCC/main.c +++ b/demos/MSP430-MSP430x1611-GCC/main.c @@ -30,6 +30,7 @@ static WORKING_AREA(waThread1, 64);
static msg_t Thread1(void *arg) {
+ (void)arg;
while (TRUE) {
palSetPad(IOPORT6, P6_O_LED);
chThdSleepMilliseconds(500);
@@ -44,6 +45,9 @@ static msg_t Thread1(void *arg) { */
int main(int argc, char **argv) {
+ (void)argc;
+ (void)argv;
+
/*
* Hardware initialization, see board.c.
*/
diff --git a/demos/Win32-MinGW/Makefile b/demos/Win32-MinGW/Makefile index f700ce159..3552537ad 100644 --- a/demos/Win32-MinGW/Makefile +++ b/demos/Win32-MinGW/Makefile @@ -99,7 +99,7 @@ LIBS = $(DLIBS) $(ULIBS) LDFLAGS = -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
ASFLAGS = -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
-CPFLAGS = $(OPT) -Wall -Wstrict-prototypes -fverbose-asm -Wa,-alms=$(<:.c=.lst) $(DEFS)
+CPFLAGS = $(OPT) -Wall -Wextra -Wstrict-prototypes -fverbose-asm -Wa,-alms=$(<:.c=.lst) $(DEFS)
# Generate dependency information
CPFLAGS += -MD -MP -MF .dep/$(@F).d
diff --git a/demos/Win32-MinGW/chcore.c b/demos/Win32-MinGW/chcore.c index 95d8b9de8..8dcb3b9ad 100644 --- a/demos/Win32-MinGW/chcore.c +++ b/demos/Win32-MinGW/chcore.c @@ -89,8 +89,9 @@ void ChkIntSources(void) { */
__attribute__((used))
static void __dummy(Thread *otp, Thread *ntp) {
+ (void)otp; (void)ntp;
asm volatile (".globl @port_switch@8 \n\t" \
- "@port_switch@8: \n\t" \
+ "@port_switch@8: \n\t" \
"push %ebp \n\t" \
"push %esi \n\t" \
"push %edi \n\t" \
diff --git a/demos/Win32-MinGW/main.c b/demos/Win32-MinGW/main.c index bca8af11b..6a2b5367f 100644 --- a/demos/Win32-MinGW/main.c +++ b/demos/Win32-MinGW/main.c @@ -42,10 +42,11 @@ msg_t TestThread(void *p); * areas. The system is halted if something is wrong.
*/
static msg_t WatchdogThread(void *arg) {
+
+ (void)arg;
wdguard = 0xA51F2E3D;
cdguard = 0xA51F2E3D;
while (TRUE) {
-
if ((wdguard != 0xA51F2E3D) ||
(cdguard != 0xA51F2E3D)) {
printf("Halted by watchdog");
@@ -64,6 +65,7 @@ static msg_t WatchdogThread(void *arg) { */
static msg_t ConsoleThread(void *arg) {
+ (void)arg;
while (!chThdShouldTerminate()) {
printf((char *)chMsgWait());
fflush(stdout);
@@ -230,6 +232,7 @@ EventListener s1tel; static void COM1Handler(eventid_t id) {
sdflags_t flags;
+ (void)id;
if (s1 && chThdTerminated(s1)) {
s1 = NULL;
cprint("Init: disconnection on SD1\n");
@@ -256,6 +259,7 @@ EventListener s2tel; static void COM2Handler(eventid_t id) {
sdflags_t flags;
+ (void)id;
if (s2 && chThdTerminated(s2)) {
s2 = NULL;
cprint("Init: disconnection on SD2\n");
|