diff --git a/_codeql_detected_source_root b/_codeql_detected_source_root new file mode 120000 index 00000000..945c9b46 --- /dev/null +++ b/_codeql_detected_source_root @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/src/KDGui/platform/linux/xcb/linux_xcb_platform_event_loop.cpp b/src/KDGui/platform/linux/xcb/linux_xcb_platform_event_loop.cpp index 47ffe51f..1b6463d1 100644 --- a/src/KDGui/platform/linux/xcb/linux_xcb_platform_event_loop.cpp +++ b/src/KDGui/platform/linux/xcb/linux_xcb_platform_event_loop.cpp @@ -89,8 +89,7 @@ void LinuxXcbPlatformEventLoop::processXcbEvents() switch (eventType) { case XCB_EXPOSE: { - const auto *expose = reinterpret_cast(xcbEvent); - KD_UNUSED(expose); // Silence unused warning in Release build + [[maybe_unused]] const auto *expose = reinterpret_cast(xcbEvent); SPDLOG_LOGGER_DEBUG(m_logger, "{}: Window {} exposed. Region to be redrawn at location ({}, {}), with dimension ({}, {})", xcbEvent->sequence, expose->window, expose->x, expose->y, expose->width, expose->height); @@ -257,8 +256,7 @@ void LinuxXcbPlatformEventLoop::processXcbEvents() } case XCB_MAP_NOTIFY: { - const auto *mapEvent = reinterpret_cast(xcbEvent); - KD_UNUSED(mapEvent); // Silence unused warning in Release build + [[maybe_unused]] const auto *mapEvent = reinterpret_cast(xcbEvent); SPDLOG_LOGGER_DEBUG(m_logger, "Map event for window {}", mapEvent->window); @@ -266,8 +264,7 @@ void LinuxXcbPlatformEventLoop::processXcbEvents() } case XCB_UNMAP_NOTIFY: { - const auto *unmapEvent = reinterpret_cast(xcbEvent); - KD_UNUSED(unmapEvent); // Silence unused warning in Release build + [[maybe_unused]] const auto *unmapEvent = reinterpret_cast(xcbEvent); SPDLOG_LOGGER_DEBUG(m_logger, "Unmap event for window {}", unmapEvent->window); diff --git a/src/KDGui/platform/linux/xcb/linux_xcb_platform_integration.cpp b/src/KDGui/platform/linux/xcb/linux_xcb_platform_integration.cpp index 04d8b0ca..6fabcfb4 100644 --- a/src/KDGui/platform/linux/xcb/linux_xcb_platform_integration.cpp +++ b/src/KDGui/platform/linux/xcb/linux_xcb_platform_integration.cpp @@ -138,9 +138,8 @@ bool LinuxXcbPlatformIntegration::initializeXkbExtension() return true; } -void LinuxXcbPlatformIntegration::dumpScreenInfo(xcb_screen_t *screen) +void LinuxXcbPlatformIntegration::dumpScreenInfo([[maybe_unused]] xcb_screen_t *screen) { - KD_UNUSED(screen); // for release builds, debug log isn't compiled in SPDLOG_DEBUG("Information about screen {}", screen->root); SPDLOG_DEBUG(" width.........: {}", screen->width_in_pixels); SPDLOG_DEBUG(" height........: {}", screen->height_in_pixels); diff --git a/src/KDGui/window.cpp b/src/KDGui/window.cpp index f1e70e94..157a3514 100644 --- a/src/KDGui/window.cpp +++ b/src/KDGui/window.cpp @@ -222,9 +222,8 @@ void Window::resizeEvent(ResizeEvent *ev) ev->setAccepted(true); } -void Window::mousePressEvent(MousePressEvent *ev) +void Window::mousePressEvent([[maybe_unused]] MousePressEvent *ev) { - KD_UNUSED(ev); // for release builds, debug log isn't compiled in SPDLOG_LOGGER_DEBUG(m_logger, "{}() buttons = {} at pos = ({}, {})", __FUNCTION__, @@ -233,9 +232,8 @@ void Window::mousePressEvent(MousePressEvent *ev) ev->yPos()); } -void Window::mouseReleaseEvent(MouseReleaseEvent *ev) +void Window::mouseReleaseEvent([[maybe_unused]] MouseReleaseEvent *ev) { - KD_UNUSED(ev); // for release builds, debug log isn't compiled in SPDLOG_LOGGER_DEBUG(m_logger, "{}() buttons = {} at pos = ({}, {})", __FUNCTION__, @@ -244,9 +242,8 @@ void Window::mouseReleaseEvent(MouseReleaseEvent *ev) ev->yPos()); } -void Window::mouseMoveEvent(MouseMoveEvent *ev) +void Window::mouseMoveEvent([[maybe_unused]] MouseMoveEvent *ev) { - KD_UNUSED(ev); // for release builds, debug log isn't compiled in SPDLOG_LOGGER_DEBUG(m_logger, "{}() buttons = {} at pos = ({}, {})", __FUNCTION__, @@ -255,9 +252,8 @@ void Window::mouseMoveEvent(MouseMoveEvent *ev) ev->yPos()); } -void Window::mouseWheelEvent(MouseWheelEvent *ev) +void Window::mouseWheelEvent([[maybe_unused]] MouseWheelEvent *ev) { - KD_UNUSED(ev); // for release builds, debug log isn't compiled in SPDLOG_LOGGER_DEBUG(m_logger, "{}() xDelta = {} yDelta = {}", __FUNCTION__, @@ -265,14 +261,12 @@ void Window::mouseWheelEvent(MouseWheelEvent *ev) ev->yDelta()); } -void Window::keyPressEvent(KeyPressEvent *ev) +void Window::keyPressEvent([[maybe_unused]] KeyPressEvent *ev) { - KD_UNUSED(ev); // for release builds, debug log isn't compiled in SPDLOG_LOGGER_DEBUG(m_logger, "{}() key = {}", __FUNCTION__, ev->key()); } -void Window::keyReleaseEvent(KeyReleaseEvent *ev) +void Window::keyReleaseEvent([[maybe_unused]] KeyReleaseEvent *ev) { - KD_UNUSED(ev); // for release builds, debug log isn't compiled in SPDLOG_LOGGER_DEBUG(m_logger, "{}() key = {}", __FUNCTION__, ev->key()); }