diff --git a/platforms/nuttx/src/px4/common/board_ioctl.c b/platforms/nuttx/src/px4/common/board_ioctl.c index d510b743488a..3753042a2e16 100644 --- a/platforms/nuttx/src/px4/common/board_ioctl.c +++ b/platforms/nuttx/src/px4/common/board_ioctl.c @@ -131,7 +131,7 @@ static int launch_kernel_builtin(int argc, char **argv) return builtin->main(argc, argv); } - return ENOENT; + return -ENOENT; } /************************************************************************************ @@ -144,7 +144,11 @@ static int launch_kernel_builtin(int argc, char **argv) static int platform_ioctl(unsigned int cmd, unsigned long arg) { - int ret = PX4_OK; + int ret = OK; + + if (arg == 0) { + return -EINVAL; + } switch (cmd) { case PLATFORMIOCLAUNCH: { diff --git a/platforms/nuttx/src/px4/common/hrt_ioctl.c b/platforms/nuttx/src/px4/common/hrt_ioctl.c index 4cba925a47a0..4c0a7d6aab26 100644 --- a/platforms/nuttx/src/px4/common/hrt_ioctl.c +++ b/platforms/nuttx/src/px4/common/hrt_ioctl.c @@ -354,7 +354,7 @@ hrt_ioctl(unsigned int cmd, unsigned long arg) #ifdef PX4_USERSPACE_HRT *(uintptr_t *)arg = hrt_absolute_time_usr_base(); #else - *(uintptr_t *)arg = NULL; + *(uintptr_t *)arg = (uintptr_t)NULL; #endif } break; diff --git a/src/drivers/pwm_esc/pwm_esc.cpp b/src/drivers/pwm_esc/pwm_esc.cpp index 9e9a6b4f2002..28e85cee0fa4 100644 --- a/src/drivers/pwm_esc/pwm_esc.cpp +++ b/src/drivers/pwm_esc/pwm_esc.cpp @@ -282,7 +282,7 @@ PWMESC::init(bool hitl_mode) _task = px4_task_spawn_cmd("pwm_esc", SCHED_DEFAULT, SCHED_PRIORITY_ACTUATOR_OUTPUTS, - 3048, + PX4_STACK_ADJUSTED(3048), (px4_main_t)&PWMESC::task_main_trampoline, nullptr);