From 828d95af1f2c60393f2e2691300c296e9bf2f763 Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Mon, 2 Sep 2024 12:43:23 +0300 Subject: [PATCH] hrt_ioctl.c: Cast NULL (which is defined as (void *)0) to integer The value is returned as integer, some compilers are not happy we assign a pointer to void. --- platforms/nuttx/src/px4/common/hrt_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;