Changeset 498 for trunk


Ignore:
Timestamp:
Aug 23, 2018, 12:02:06 AM (6 years ago)
Author:
viala@…
Message:

[boot] Add static const to a device_type_str.

Fix:
`
boot.c: At top level:
boot.c:123:14: warning: no previous declaration for 'device_type_str'
[-Wmissing-declarations]

const char * device_type_str( uint32_t dev_type )


`
And
`
boot.c: At top level:
boot.c:123:8: warning: no previous declaration for 'device_type_str' [-Wmissing-declarations]

char * device_type_str( uint32_t dev_type )


boot.c: In function 'device_type_str':
boot.c:125:52: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]

if ( dev_type == DEV_TYPE_RAM_SCL ) return "RAM_SCL";


boot.c:126:52: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]

else if( dev_type == DEV_TYPE_ROM_SCL ) return "ROM_SCL";

[...]
`

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/boot/tsar_mips32/boot.c

    r474 r498  
    121121 * This function returns the printable string for each device type
    122122 ********************************************************************************/
    123 char * device_type_str( uint32_t dev_type )
     123static const char * device_type_str( uint32_t dev_type )
    124124{
    125125    if     ( dev_type == DEV_TYPE_RAM_SCL ) return "RAM_SCL";
Note: See TracChangeset for help on using the changeset viewer.