fix(led): align ioctl override with cdev signature

Commit a707ad499d reverted cdev::CDev::ioctl to take `unsigned long arg`
again, but missed the LED driver. led.cpp's `int ioctl(file_t*, int,
uintptr_t arg)` overrider then no longer matched the parent and
triggered "marked override but does not override" on every NuttX/
Linux build.

Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
This commit is contained in:
Nuno Marques
2026-05-07 15:54:48 -07:00
parent a356b278a4
commit 9e3c1da7fc
2 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -422,8 +422,12 @@ set(TESTFILTER "" CACHE STRING "Filter string for ctest to selectively only run
include(px4_add_gtest)
if(BUILD_TESTING)
# Setting FUZZTEST_FUZZING_MODE=on enables ASAN, and is only supported with Clang
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang"))
# Setting FUZZTEST_FUZZING_MODE=on enables ASAN, and is only supported with Clang.
# clang-cl on Windows uses the MSVC driver: ASAN there is incompatible with the
# debug C runtime (/MDd) emitted by CMake's Debug config, so keep fuzzing mode
# off on that combination and just compile fuzztest as a plain dependency.
if ((("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang"))
AND NOT (WIN32 AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC"))
set(FUZZTEST_FUZZING_MODE ON)
endif()
add_subdirectory(test)
+2 -2
View File
@@ -64,7 +64,7 @@ public:
~LED() override = default;
int init() override;
int ioctl(cdev::file_t *filp, int cmd, uintptr_t arg) override;
int ioctl(cdev::file_t *filp, int cmd, unsigned long arg) override;
};
LED::LED() : CDev(LED0_DEVICE_PATH)
@@ -86,7 +86,7 @@ LED::init()
}
int
LED::ioctl(cdev::file_t *filp, int cmd, uintptr_t arg)
LED::ioctl(cdev::file_t *filp, int cmd, unsigned long arg)
{
int result = OK;