mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 11:53:34 +08:00
minor build fixes and ignored warnings for GCC 9 (#14159)
- px4io task_main_trampoline add return - iridiumsbd main_loop_helper add return - drivers/uavcan ignore Wcast-align, Wdeprecated-copy, and Waddress-of-packed-member for now - flashparams ignore Wvla-larger-than - test_time fix printf type
This commit is contained in:
@@ -98,6 +98,7 @@ px4_add_module(
|
||||
-Wno-unused-but-set-variable
|
||||
-Wno-unused-result
|
||||
-Wno-unused-variable
|
||||
-Wno-vla-larger-than
|
||||
SRCS
|
||||
${srcs}
|
||||
DEPENDS
|
||||
|
||||
@@ -76,8 +76,8 @@ cycletime(void)
|
||||
int test_time(int argc, char *argv[])
|
||||
{
|
||||
hrt_abstime h, c;
|
||||
int64_t lowdelta, maxdelta = 0;
|
||||
int64_t delta, deltadelta;
|
||||
int lowdelta, maxdelta = 0;
|
||||
int delta, deltadelta;
|
||||
|
||||
/* enable the cycle counter */
|
||||
(*(unsigned long *)0xe000edfc) |= (1 << 24); /* DEMCR |= DEMCR_TRCENA */
|
||||
@@ -111,7 +111,7 @@ int test_time(int argc, char *argv[])
|
||||
|
||||
px4_leave_critical_section(flags);
|
||||
|
||||
delta = abs(h - c);
|
||||
delta = h - c;
|
||||
deltadelta = abs(delta - lowdelta);
|
||||
|
||||
if (deltadelta > maxdelta) {
|
||||
@@ -119,7 +119,7 @@ int test_time(int argc, char *argv[])
|
||||
}
|
||||
|
||||
if (deltadelta > 1000) {
|
||||
fprintf(stderr, "h %" PRIu64 " c %" PRIu64 " d %" PRId64 "\n", h, c, delta - lowdelta);
|
||||
fprintf(stderr, "h %" PRIu64 " c %" PRIu64 " d %d\n", h, c, delta - lowdelta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user