]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add cppcheck after tests
authorBastian Dehn <hhaalo@arcor.de>
Tue, 21 Oct 2025 19:20:07 +0000 (21:20 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Tue, 21 Oct 2025 19:21:32 +0000 (21:21 +0200)
src/kds_s2000w_net.c
tests/CMakeLists.txt

index 4a02c9328d225628f718bd1439e71f06c73c3d92..fd8a6888dea243a7553bbdd50191aa238217ed44 100644 (file)
@@ -248,6 +248,7 @@ SANE_Status sane_kds_s2000w_net_set_io_mode(SANE_Handle handle,
        return SANE_STATUS_UNSUPPORTED;
 }
 
+// cppcheck-suppress constParameterPointer
 SANE_Status sane_kds_s2000w_net_get_select_fd(SANE_Handle handle, SANE_Int* fd)
 {
        kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_get_select_fd");
index 2c9795ae741a57c086868a64e42739ba7f90e3bf..3b86e3a09ecd2ea53f65931854d4c0aa70e65672 100644 (file)
@@ -85,6 +85,15 @@ ADD_CUSTOM_TARGET("runningtests"
        "kds_s2000w_image_converter_tests"
        "kds_s2000w_pixel_converter_tests")
 
+ADD_CUSTOM_TARGET("cppcheck"
+       ALL cppcheck --check-level=exhaustive
+               --enable=warning,style
+               --inline-suppr
+               --error-exitcode=1
+               ${CMAKE_SOURCE_DIR}/src
+               ${CMAKE_SOURCE_DIR}/tests
+       DEPENDS runningtests)
+
 ADD_CUSTOM_TARGET("generate_gcov_coverage"
        ALL gcov ${CMAKE_BINARY_DIR}/src/CMakeFiles/sane-kds_s2000w_net-static.dir/*.c.o
        DEPENDS "runningtests")