Fixing warning messages found using clang.
This commit is contained in:
parent
621d8736e7
commit
8e54672121
12
Lib/mk20dx.c
12
Lib/mk20dx.c
@ -404,6 +404,7 @@ const uint8_t flashconfigbytes[16] = {
|
|||||||
|
|
||||||
// ----- Functions -----
|
// ----- Functions -----
|
||||||
|
|
||||||
|
#if defined(_mk20dx128vlf5_) && defined(_bootloader_) // Bootloader Section
|
||||||
__attribute__((noreturn))
|
__attribute__((noreturn))
|
||||||
static inline void jump_to_app( uintptr_t addr )
|
static inline void jump_to_app( uintptr_t addr )
|
||||||
{
|
{
|
||||||
@ -414,6 +415,7 @@ static inline void jump_to_app( uintptr_t addr )
|
|||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
__builtin_unreachable();
|
__builtin_unreachable();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void *memset( void *addr, int val, unsigned int len )
|
void *memset( void *addr, int val, unsigned int len )
|
||||||
{
|
{
|
||||||
@ -475,8 +477,8 @@ void ResetHandler()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32_t *src = &_etext;
|
uint32_t *src = (uint32_t*)&_etext;
|
||||||
uint32_t *dest = &_sdata;
|
uint32_t *dest = (uint32_t*)&_sdata;
|
||||||
|
|
||||||
// Enable clocks to always-used peripherals
|
// Enable clocks to always-used peripherals
|
||||||
SIM_SCGC5 = 0x00043F82; // Clocks active to all GPIO
|
SIM_SCGC5 = 0x00043F82; // Clocks active to all GPIO
|
||||||
@ -504,9 +506,9 @@ void ResetHandler()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prepare RAM
|
// Prepare RAM
|
||||||
while ( dest < &_edata ) *dest++ = *src++;
|
while ( dest < (uint32_t*)&_edata ) *dest++ = *src++;
|
||||||
dest = &_sbss;
|
dest = (uint32_t*)&_sbss;
|
||||||
while ( dest < &_ebss ) *dest++ = 0;
|
while ( dest < (uint32_t*)&_ebss ) *dest++ = 0;
|
||||||
|
|
||||||
// MCHCK
|
// MCHCK
|
||||||
#if defined(_mk20dx128vlf5_)
|
#if defined(_mk20dx128vlf5_)
|
||||||
|
@ -616,7 +616,7 @@ inline TriggerMacroVote Macro_evalLongTriggerMacroVote( TriggerGuide *key, Trigg
|
|||||||
|
|
||||||
|
|
||||||
// Evaluate/Update TriggerMacro
|
// Evaluate/Update TriggerMacro
|
||||||
inline TriggerMacroEval Macro_evalTriggerMacro( var_uint_t triggerMacroIndex )
|
TriggerMacroEval Macro_evalTriggerMacro( var_uint_t triggerMacroIndex )
|
||||||
{
|
{
|
||||||
// Lookup TriggerMacro
|
// Lookup TriggerMacro
|
||||||
const TriggerMacro *macro = &TriggerMacroList[ triggerMacroIndex ];
|
const TriggerMacro *macro = &TriggerMacroList[ triggerMacroIndex ];
|
||||||
|
@ -567,17 +567,17 @@ struct usb_string_descriptor_struct string0 = {
|
|||||||
struct usb_string_descriptor_struct usb_string_manufacturer_name_default = {
|
struct usb_string_descriptor_struct usb_string_manufacturer_name_default = {
|
||||||
sizeof(STR_MANUFACTURER),
|
sizeof(STR_MANUFACTURER),
|
||||||
3,
|
3,
|
||||||
STR_MANUFACTURER
|
{STR_MANUFACTURER}
|
||||||
};
|
};
|
||||||
struct usb_string_descriptor_struct usb_string_product_name_default = {
|
struct usb_string_descriptor_struct usb_string_product_name_default = {
|
||||||
sizeof(STR_PRODUCT),
|
sizeof(STR_PRODUCT),
|
||||||
3,
|
3,
|
||||||
STR_PRODUCT
|
{STR_PRODUCT}
|
||||||
};
|
};
|
||||||
struct usb_string_descriptor_struct usb_string_serial_number_default = {
|
struct usb_string_descriptor_struct usb_string_serial_number_default = {
|
||||||
sizeof(STR_SERIAL),
|
sizeof(STR_SERIAL),
|
||||||
3,
|
3,
|
||||||
STR_SERIAL
|
{STR_SERIAL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user