connectedhomeip
connectedhomeip copied to clipboard
[BUG] Bug found by bugprone-casting-through-void check in .clang-tidy
Reproduction steps
- Add
bugprone-casting-through-voidto.clang-tidy - Open latest build container based on ubuntu:24.04
- Run
Clang-tidy validationand previous step from build.yaml
Bug prevalence
always
GitHub hash of the SDK that was being used
4cdce52a5fa25542d4fbeb3cdff6e75b3aa1c379
Platform
other
Platform Version(s)
No response
Anything else?
Log file with clang-tidy error: 1_Build on Linux (fake, gcc_release, clang, simulated).txt
@jlatusek Those are all from using the GLib API macros, right? Sounds like we need to add suppressions for those cases or something. That's not code we control.
@bzbarsky-apple This error is caused by using glib macros to do the casting. We can try to do the casting another way, but glib macros also check that the object being casted is of the correct type.
Right, so it sounds like we need to suppress the clang-tidy check for these known-safe cases....
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Remove stale label or comment or this will be closed in 30 days.
We should add supression comments or fix the code. At the same time, I believe we updated to ubuntu 24.04 and evetyhing should be updated now.
Closing as likely stale - we support ubuntu 24.04 today.