HAL_ChibiOS: fixed gcc9 warnings
This commit is contained in:
parent
fabbbea0b4
commit
90cd2a38b6
@ -220,10 +220,10 @@ public:
|
||||
|
||||
// CAN Peripheral register structure
|
||||
static constexpr bxcan::CanType* const Can[HAL_NUM_CAN_IFACES] = {
|
||||
reinterpret_cast<bxcan::CanType*>(0x40006400)
|
||||
reinterpret_cast<bxcan::CanType*>(uintptr_t(0x40006400U))
|
||||
#if HAL_NUM_CAN_IFACES > 1
|
||||
,
|
||||
reinterpret_cast<bxcan::CanType*>(0x40006800)
|
||||
reinterpret_cast<bxcan::CanType*>(uintptr_t(0x40006800U))
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
@ -143,6 +143,7 @@ int __wrap_scanf(const char *fmt, ...)
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
// alias fiprintf() to fprintf(). This saves flash space
|
||||
int __wrap_fiprintf(const char *fmt, ...) __attribute__((alias("__wrap_fprintf")));
|
||||
// empty function fiprintf(), saves flash space for unused code path
|
||||
int __wrap_fiprintf(const char *fmt, ...);
|
||||
int __wrap_fiprintf(const char *fmt, ...) { return -1; }
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ static void save_fault_watchdog(uint16_t line, FaultType fault_type, uint32_t fa
|
||||
pd.fault_thd_prio = tp->prio;
|
||||
// get first 4 bytes of the name, but only of first fault
|
||||
if (tp->name && pd.thread_name4[0] == 0) {
|
||||
strncpy(pd.thread_name4, tp->name, 4);
|
||||
strncpy_noterm(pd.thread_name4, tp->name, 4);
|
||||
}
|
||||
}
|
||||
pd.fault_icsr = SCB->ICSR;
|
||||
|
Loading…
Reference in New Issue
Block a user