From: Nick Craig-W. <nc...@ax...> - 2003-06-30 10:01:39
|
I've been updating our project to use sdcc latest (which makes much smaller code which is great!). A few things have come to light... I have this function u8 eeprom_read(u16 address) { (void)address; _asm clr _EA clr _EEPROM_DISABLE movx a,@dptr setb _EEPROM_DISABLE setb _EA mov dpl, a _endasm; } Which generates this new warning hardware.c:163: warning: function 'eeprom_read' must return value I obviously can't put a return at the end of the function as dpl is already set up. Making the function __naked doesn't help either. Any ideas on how to avoid this warning? -- Nick Craig-Wood nc...@ax... |
From: Bernhard H. <Ber...@be...> - 2003-06-30 10:52:02
|
> hardware.c:163: warning: function 'eeprom_read' must return value > > I obviously can't put a return at the end of the function as dpl is > already set up. Making the function __naked doesn't help either. #pragma LESS_PEDANTIC is doing the trick. Bernhard |