Skip to content

fix compiler warnings in hss_led, libeq3config and rfd - #30

Merged
jens-maus merged 1 commit into
mainfrom
pr/fix-warnings
Sep 8, 2026
Merged

fix compiler warnings in hss_led, libeq3config and rfd#30
jens-maus merged 1 commit into
mainfrom
pr/fix-warnings

Conversation

@jens-maus

@jens-maus jens-maus commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of failed internet checks and update downloads, with clearer diagnostics.
    • Fixed update and device identification reads to handle missing or empty data safely.
    • Improved LED status reporting when a device reports an undefined state.
    • Prevented invalid LED timing data from being interpreted incorrectly.
    • Improved compatibility with newer libusb versions.
  • Release

    • Updated the application version to 2.3.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1e2e4e4c-71b8-47bc-a9c0-6d4410107e0e

📥 Commits

Reviewing files that changed from the base of the PR and between 7b30a69 and ae4add3.

📒 Files selected for processing (7)
  • src/hss_led/Network.cpp
  • src/hss_led/UpdateAvailable.cpp
  • src/hss_led/hss_led.cpp
  • src/hss_led/led.cpp
  • src/libeq3config/CCU2CommControllerMod/CCU2CommControllerMod.cpp
  • src/libeq3config/CCU2CommControllerMod/LGWPortWrapperMod.cpp
  • src/rfd/hid_linux/HIDDevice.cpp

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changes add result validation for system commands and file reads, correct file descriptor handling, define undefined LED behavior, select the appropriate libusb logging API, simplify a command condition, and update the application version.

Changes

Runtime reliability updates

Layer / File(s) Summary
Input and command validation
src/hss_led/Network.cpp, src/hss_led/UpdateAvailable.cpp, src/hss_led/led.cpp
System commands and file reads now check results, bound input, handle empty or failed reads, and close descriptors after reading.
LED and command state handling
src/libeq3config/CCU2CommControllerMod/CCU2CommControllerMod.cpp, src/libeq3config/CCU2CommControllerMod/LGWPortWrapperMod.cpp
The bootloader check uses an explicit condition. LED_UNDEFINED now emits the LED-off payload.
Version and libusb compatibility
src/hss_led/hss_led.cpp, src/rfd/hid_linux/HIDDevice.cpp
The application version changes to 2.3. libusb logging uses libusb_set_option for newer API versions and the legacy API otherwise.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to ae4ad

This change improves runtime error handling, bounds LED-delay reads, defines undefined LED output, and updates libusb logging compatibility without a demonstrated user or production regression.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main purpose of the changes: fixing compiler warnings across hss_led, libeq3config, and rfd.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pr/fix-warnings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jens-maus
jens-maus merged commit 6ab3399 into main Sep 8, 2026
4 of 5 checks passed
@jens-maus
jens-maus deleted the pr/fix-warnings branch September 8, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant