Fixing warning messages found using clang.

This commit is contained in:
Jacob Alexander 2014-12-31 19:43:10 -08:00
parent 621d8736e7
commit 8e54672121
3 changed files with 11 additions and 9 deletions

View file

@ -404,6 +404,7 @@ const uint8_t flashconfigbytes[16] = {
// ----- Functions -----
#if defined(_mk20dx128vlf5_) && defined(_bootloader_) // Bootloader Section
__attribute__((noreturn))
static inline void jump_to_app( uintptr_t addr )
{
@ -414,6 +415,7 @@ static inline void jump_to_app( uintptr_t addr )
// NOTREACHED
__builtin_unreachable();
}
#endif
void *memset( void *addr, int val, unsigned int len )
{
@ -475,8 +477,8 @@ void ResetHandler()
}
#endif
uint32_t *src = &_etext;
uint32_t *dest = &_sdata;
uint32_t *src = (uint32_t*)&_etext;
uint32_t *dest = (uint32_t*)&_sdata;
// Enable clocks to always-used peripherals
SIM_SCGC5 = 0x00043F82; // Clocks active to all GPIO
@ -504,9 +506,9 @@ void ResetHandler()
}
// Prepare RAM
while ( dest < &_edata ) *dest++ = *src++;
dest = &_sbss;
while ( dest < &_ebss ) *dest++ = 0;
while ( dest < (uint32_t*)&_edata ) *dest++ = *src++;
dest = (uint32_t*)&_sbss;
while ( dest < (uint32_t*)&_ebss ) *dest++ = 0;
// MCHCK
#if defined(_mk20dx128vlf5_)