mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 04:33:10 +08:00
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:
+6
-2
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user