This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Looks like the diff was done in reverse. Attached is the same patch, but leaves the 'static' qualifier for the find_bank() function. Jay -----Original Message----- From: sebastien Couret [mailto:sebastien.couret@elios-informatique.fr] Sent: Wednesday, April 21, 2004 5:11 AM To: ecos-patches@sources.redhat.com Subject: Silence warnings in flash_am29xxxxx.inl Hi guyz, Some warnings are issued when compiling library with flash_am29xxxxx support (AMD Rattler) "In file included from devs/flash/powerpc/rattler/current/src/rattler_flash.c:71: include/cyg/io/flash_am29xxxxx.inl: In function `flash_program_buf': include/cyg/io/flash_am29xxxxx.inl:434: warning: `SECT' might be used uninitialized in this function include/cyg/io/flash_am29xxxxx.inl: In function `find_bank': include/cyg/io/flash_am29xxxxx.inl:553: warning: return discards qualifiers from pointer target type include/cyg/io/flash_am29xxxxx.inl: In function `find_sector': include/cyg/io/flash_am29xxxxx.inl:573: warning: assignment of read-only variable `res' " Here 's a patch to silence these warnings : diff -a -w -u -r devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx.inl devs/flash/amd/am29xxxxx/current/include/1.21/ --- devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx.inl Wed Apr 21 13:02:04 2004 +++ devs/flash/amd/am29xxxxx/current/include/1.21/flash_am29xxxxx.inl Wed Apr 21 13:00:33 2004 @@ -192,7 +192,7 @@ //-------------------------------------------------------------------------- - - // Auxiliary functions -volatile flash_data_t * find_bank(volatile flash_data_t * base, void * addr, CYG_ADDRWORD * bo) +static flash_data_t * find_bank(volatile flash_data_t * base, void * addr, CYG_ADDRWORD * bo) __attribute__ ((section (".2ram.find_bank"))); static flash_data_t * find_sector(volatile flash_data_t * addr, unsigned long *remain_size) __attribute__ ((section (".2ram.find_sector"))); @@ -431,7 +431,7 @@ { volatile flash_data_t* ROM; volatile flash_data_t* BANK; - volatile flash_data_t* SECT=NULL; + volatile flash_data_t* SECT; volatile flash_data_t* data_ptr = (volatile flash_data_t*) data; volatile flash_data_t* addr_p = (flash_data_t*) addr; volatile flash_data_t* addr_v = FLASH_P2V(addr_p); @@ -532,7 +532,7 @@ return res; } -volatile flash_data_t * +static flash_data_t * find_bank(volatile flash_data_t * base, void * addr, CYG_ADDRWORD * bo) { volatile flash_data_t * res = base; @@ -559,7 +559,7 @@ const CYG_ADDRESS mask = flash_dev_info->block_size - 1; const CYG_ADDRESS a = (CYG_ADDRESS) addr; const CYG_ADDRESS base = a & flash_dev_info->base_mask; - CYG_ADDRESS res = a & ~mask; + const CYG_ADDRESS res = a & ~mask; *remain_size = flash_dev_info->block_size - (a & mask); And the Changelog entry : 2004-04-21 Sebastien Couret <sebastien.couret@elios-informatique.com> * include/flash_am29xxxxx.inl: Silence a few warnings . Have a nice day.
Attachment:
am1.pat
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |