From: bernie Date: Fri, 31 Dec 2004 17:47:45 +0000 (+0000) Subject: Rename UNUSED() to UNUSED_ARG(). X-Git-Tag: 1.0.0~913 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=96f8c49fdf97d48ddbacb1d8d94fd5a735051e2d;p=bertos.git Rename UNUSED() to UNUSED_ARG(). git-svn-id: https://src.develer.com/svnoss/bertos/trunk@328 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/drv/kdebug.c b/drv/kdebug.c index 03a86430..48ff07a9 100755 --- a/drv/kdebug.c +++ b/drv/kdebug.c @@ -15,6 +15,9 @@ /*#* *#* $Log$ + *#* Revision 1.19 2004/12/31 17:47:45 bernie + *#* Rename UNUSED() to UNUSED_ARG(). + *#* *#* Revision 1.18 2004/12/08 08:52:00 bernie *#* Save some more RAM on AVR. *#* @@ -257,7 +260,7 @@ void kdbg_init(void) /*! * Output one character to the debug console */ -static void __kputchar(char c, UNUSED(void *, unused)) +static void __kputchar(char c, UNUSED_ARG(void *, unused)) { /* Poll while serial buffer is still busy */ KDBG_WAIT_READY(); diff --git a/drv/ser_avr.c b/drv/ser_avr.c index a54d3764..96583e6e 100755 --- a/drv/ser_avr.c +++ b/drv/ser_avr.c @@ -38,6 +38,9 @@ /*#* *#* $Log$ + *#* Revision 1.22 2004/12/31 17:47:45 bernie + *#* Rename UNUSED() to UNUSED_ARG(). + *#* *#* Revision 1.21 2004/12/13 12:07:06 bernie *#* DISABLE_IRQSAVE/ENABLE_IRQRESTORE: Convert to IRQ_SAVE_DISABLE/IRQ_RESTORE. *#* @@ -350,13 +353,15 @@ struct Serial *ser_spi = &ser_handles[SER_SPI]; /* * Callbacks */ -static void uart0_init(UNUSED(struct SerialHardware *, _hw), UNUSED(struct Serial *, ser)) +static void uart0_init( + UNUSED_ARG(struct SerialHardware *, _hw), + UNUSED_ARG(struct Serial *, ser)) { SER_UART0_BUS_TXINIT; RTS_ON; } -static void uart0_cleanup(UNUSED(struct SerialHardware *, _hw)) +static void uart0_cleanup(UNUSED_ARG(struct SerialHardware *, _hw)) { UCSR0B = 0; } @@ -377,7 +382,7 @@ static void uart0_enabletxirq(struct SerialHardware *_hw) } } -static void uart0_setbaudrate(UNUSED(struct SerialHardware *, _hw), unsigned long rate) +static void uart0_setbaudrate(UNUSED_ARG(struct SerialHardware *, _hw), unsigned long rate) { /* Compute baud-rate period */ uint16_t period = (((CLOCK_FREQ / 16UL) + (rate / 2)) / rate) - 1; @@ -390,7 +395,7 @@ static void uart0_setbaudrate(UNUSED(struct SerialHardware *, _hw), unsigned lon //DB(kprintf("uart0_setbaudrate(rate=%lu): period=%d\n", rate, period);) } -static void uart0_setparity(UNUSED(struct SerialHardware *, _hw), int parity) +static void uart0_setparity(UNUSED_ARG(struct SerialHardware *, _hw), int parity) { #if !CPU_AVR_ATMEGA103 UCSR0C = (UCSR0C & ~(BV(UPM1) | BV(UPM0))) | ((parity) << UPM0); @@ -399,14 +404,16 @@ static void uart0_setparity(UNUSED(struct SerialHardware *, _hw), int parity) #if AVR_HAS_UART1 -static void uart1_init(UNUSED(struct SerialHardware *, _hw), UNUSED(struct Serial *, ser)) +static void uart1_init( + UNUSED_ARG(struct SerialHardware *, _hw), + UNUSED_ARG(struct Serial *, ser)) { SER_UART1_BUS_TXINIT; RTS_ON; SER_STROBE_INIT; } -static void uart1_cleanup(UNUSED(struct SerialHardware *, _hw)) +static void uart1_cleanup(UNUSED_ARG(struct SerialHardware *, _hw)) { UCSR1B = 0; } @@ -428,7 +435,7 @@ static void uart1_enabletxirq(struct SerialHardware *_hw) } } -static void uart1_setbaudrate(UNUSED(struct SerialHardware *, _hw), unsigned long rate) +static void uart1_setbaudrate(UNUSED_ARG(struct SerialHardware *, _hw), unsigned long rate) { /* Compute baud-rate period */ uint16_t period = (((CLOCK_FREQ / 16UL) + (rate / 2)) / rate) - 1; @@ -439,14 +446,14 @@ static void uart1_setbaudrate(UNUSED(struct SerialHardware *, _hw), unsigned lon //DB(kprintf("uart1_setbaudrate(rate=%ld): period=%d\n", rate, period);) } -static void uart1_setparity(UNUSED(struct SerialHardware *, _hw), int parity) +static void uart1_setparity(UNUSED_ARG(struct SerialHardware *, _hw), int parity) { UCSR1C = (UCSR1C & ~(BV(UPM1) | BV(UPM0))) | ((parity) << UPM0); } #endif // AVR_HAS_UART1 -static void spi_init(UNUSED(struct SerialHardware *, _hw), UNUSED(struct Serial *, ser)) +static void spi_init(UNUSED_ARG(struct SerialHardware *, _hw), UNUSED_ARG(struct Serial *, ser)) { /* * Set MOSI and SCK ports out, MISO in. @@ -467,7 +474,7 @@ static void spi_init(UNUSED(struct SerialHardware *, _hw), UNUSED(struct Serial SPCR = BV(SPE) | BV(SPIE) | BV(MSTR) | BV(SPR0); } -static void spi_cleanup(UNUSED(struct SerialHardware *, _hw)) +static void spi_cleanup(UNUSED_ARG(struct SerialHardware *, _hw)) { SPCR = 0; /* Set all pins as inputs */ @@ -491,12 +498,14 @@ static void spi_starttx(struct SerialHardware *_hw) IRQ_RESTORE(flags); } -static void spi_setbaudrate(UNUSED(struct SerialHardware *, _hw), UNUSED(unsigned long, rate)) +static void spi_setbaudrate( + UNUSED_ARG(struct SerialHardware *, _hw), + UNUSED_ARG(unsigned long, rate)) { // nop } -static void spi_setparity(UNUSED(struct SerialHardware *, _hw), UNUSED(int, parity)) +static void spi_setparity(UNUSED_ARG(struct SerialHardware *, _hw), UNUSED_ARG(int, parity)) { // nop } diff --git a/mware/sprintf.c b/mware/sprintf.c index dacb06c6..84c5f0c6 100755 --- a/mware/sprintf.c +++ b/mware/sprintf.c @@ -13,6 +13,9 @@ /*#* *#* $Log$ + *#* Revision 1.7 2004/12/31 17:47:45 bernie + *#* Rename UNUSED() to UNUSED_ARG(). + *#* *#* Revision 1.6 2004/11/16 21:15:19 bernie *#* Fix off-by-one bug in [v]snprintf(). *#* @@ -29,25 +32,6 @@ *#* *#* Revision 1.2 2004/06/03 11:27:09 bernie *#* Add dual-license information. - *#* - *#* Revision 1.1 2004/05/23 15:43:16 bernie - *#* Import mware modules. - *#* - *#* Revision 1.4 2004/04/03 20:42:27 aleph - *#* Remove duplicated defines - *#* - *#* Revision 1.3 2004/03/24 15:48:53 bernie - *#* Remove Copyright messages from Doxygen output - *#* - *#* Revision 1.2 2004/03/19 16:51:30 bernie - *#* Add PROGMEM kludge. - *#* - *#* Revision 1.1 2004/02/23 09:45:09 aleph - *#* Add missing library functions. - *#* - *#* Revision 1.1 2003/11/13 16:56:37 aleph - *#* Add first implementation of dsp firmware - *#* *#*/ #include "compiler.h" @@ -66,7 +50,7 @@ static void __str_put_char(char c, void *ptr) (*((char **)ptr))++; } -static void __null_put_char(UNUSED(char, c), UNUSED(void *, ptr)) +static void __null_put_char(UNUSED_ARG(char, c), UNUSED_ARG(void *, ptr)) { /* nop */ } diff --git a/mware/text_format.c b/mware/text_format.c index c38bff8c..d8080a90 100755 --- a/mware/text_format.c +++ b/mware/text_format.c @@ -15,6 +15,9 @@ /*#* *#* $Log$ + *#* Revision 1.9 2004/12/31 17:47:45 bernie + *#* Rename UNUSED() to UNUSED_ARG(). + *#* *#* Revision 1.8 2004/11/16 21:16:56 bernie *#* Update to new naming scheme in mware/gfx.c. *#* @@ -174,7 +177,10 @@ int PGM_FUNC(text_xprintf)(struct Bitmap *bm, /*! * Return the width in pixels of a vprintf()-formatted string. */ -int PGM_FUNC(text_vwidthf)(UNUSED(struct Bitmap *, bm), const char * PGM_ATTR fmt, va_list ap) +int PGM_FUNC(text_vwidthf)( + UNUSED_ARG(struct Bitmap *, bm), + const char * PGM_ATTR fmt, + va_list ap) { return PGM_FUNC(vsprintf)(NULL, fmt, ap) * FONT_WIDTH; }