mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 02:21:35 +08:00
LPC11C24 warning fixes
This commit is contained in:
@@ -35,7 +35,7 @@ const int32_t MaxUtcSpeedCorrectionX16 = 100 * 16;
|
|||||||
#if __GNUC__
|
#if __GNUC__
|
||||||
__attribute__((noreturn))
|
__attribute__((noreturn))
|
||||||
#endif
|
#endif
|
||||||
void fail()
|
static void fail()
|
||||||
{
|
{
|
||||||
while (true) { }
|
while (true) { }
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ void adjustUtc(uavcan::UtcDuration adjustment)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
time_utc += adj_usec;
|
time_utc = uint64_t(int64_t(time_utc) + adj_usec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!utc_set)
|
if (!utc_set)
|
||||||
@@ -168,7 +168,7 @@ void SysTick_Handler()
|
|||||||
if (utc_set)
|
if (utc_set)
|
||||||
{
|
{
|
||||||
// Values below 16 are ignored
|
// Values below 16 are ignored
|
||||||
time_utc += USecPerOverflow + (utc_correction_usec_per_overflow_x16 / 16);
|
time_utc += uint64_t(int32_t(USecPerOverflow) + (utc_correction_usec_per_overflow_x16 / 16));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ DEF += -DNDEBUG -DCHIP_LPC11CXX -DCORE_M0 -DTHUMB_NO_INTERWORKING -U__STRICT_ANS
|
|||||||
|
|
||||||
FLAGS = -mthumb -mcpu=cortex-m0 -mno-thumb-interwork -flto -Os -g3 -Wall -Wextra -Werror -ffunction-sections \
|
FLAGS = -mthumb -mcpu=cortex-m0 -mno-thumb-interwork -flto -Os -g3 -Wall -Wextra -Werror -ffunction-sections \
|
||||||
-fdata-sections -fno-common -fno-exceptions -fno-unwind-tables -fno-stack-protector -fomit-frame-pointer \
|
-fdata-sections -fno-common -fno-exceptions -fno-unwind-tables -fno-stack-protector -fomit-frame-pointer \
|
||||||
-ftracer -ftree-loop-distribute-patterns -frename-registers -freorder-blocks -fconserve-stack
|
-ftracer -ftree-loop-distribute-patterns -frename-registers -freorder-blocks -fconserve-stack \
|
||||||
|
-Wfloat-equal
|
||||||
|
|
||||||
C_CPP_FLAGS = $(FLAGS) -MD -MP -MF $(DEPDIR)/$(@F).d
|
C_CPP_FLAGS = $(FLAGS) -MD -MP -MF $(DEPDIR)/$(@F).d
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ void lltoa(long long n, char buf[24])
|
|||||||
unsigned i = 0;
|
unsigned i = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
buf[i++] = n % 10 + '0';
|
buf[i++] = char(n % 10 + '0');
|
||||||
}
|
}
|
||||||
while ((n /= 10) > 0);
|
while ((n /= 10) > 0);
|
||||||
if (sign < 0)
|
if (sign < 0)
|
||||||
|
|||||||
@@ -154,6 +154,8 @@ void resetWatchdog()
|
|||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
|
||||||
|
void SystemInit();
|
||||||
|
|
||||||
void SystemInit()
|
void SystemInit()
|
||||||
{
|
{
|
||||||
board::init();
|
board::init();
|
||||||
|
|||||||
@@ -30,6 +30,17 @@ extern void SystemInit(void);
|
|||||||
|
|
||||||
#pragma GCC optimize 1
|
#pragma GCC optimize 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prototypes for the functions below
|
||||||
|
*/
|
||||||
|
void Reset_Handler(void);
|
||||||
|
void Default_Handler(void);
|
||||||
|
void NMI_Handler(void);
|
||||||
|
void HardFault_Handler(void);
|
||||||
|
void SVC_Handler(void);
|
||||||
|
void PendSV_Handler(void);
|
||||||
|
void SysTick_Handler(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Firmware entry point
|
* Firmware entry point
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user