Disable more clang-tidy checks#564
Closed
gaul wants to merge 16 commits into
Closed
Conversation
This avoids unneeded system calls. Signed-off-by: Andrew Gaul <andrew@gaul.org>
Use O_NOFOLLOW to avoid symbolic links. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
The loop had no termination condition, so when no trip point of the requested type existed, the unsigned index underflowed past 0 to UINT_MAX and the loop read trip_points out of bounds indefinitely. Bound the loop with j >= 0 so it exits cleanly when no match is found. Signed-off-by: Andrew Gaul <andrew@gaul.org> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Andrew Gaul <andrew@gaul.org>
When in the config directory the file "thermald-features.xml" is present, it gives ability to disable some features. Currently it allows DbusControl XMLThermalConfig DataVaultFromFileSystem KobjectUeventSupport When 0 that feature is disabled. If the file is absent all features are enabled. Signed-off-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Use feature configs to enable/disable a feature. Signed-off-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
thd_sys_fs.cpp:203:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] 203 | ret = -EIO; Signed-off-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Use O_NOFOLLOW when opening lock file. Also replace std::ofstream fout with open with O_NOFOLLOW. Signed-off-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Read one less than size of string via pread and foce NULL characted at the last character. Signed-off-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
No need for static for pref_str. Signed-off-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Move to TDRUNDIR instead of /tmp. Signed-off-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Although data vault source is BIOS, check for buffer overflows. Signed-off-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Add get_string_obj() which checks for bounds in GDDV. Signed-off-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
When reading from file system use sysfs class, so that all file operations uses same method. Signed-off-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
This is sufficient to compile warning-free with clang-tidy 22. Signed-off-by: Andrew Gaul <andrew@gaul.org>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s clang-tidy configuration and invocation to achieve a warning-free run with clang-tidy 22.
Changes:
- Updates the
clang-tidyMakefile target to pass an explicit C++ standard and adjust header filtering behavior. - Disables additional
bugprone-*checks in.clang-tidyto avoid new warnings introduced by clang-tidy 22.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Makefile.am |
Adjusts the clang-tidy target arguments (C++ standard / header filtering) to match clang-tidy 22 behavior. |
.clang-tidy |
Expands the disabled-check list to reduce clang-tidy 22 warnings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
eb61654 to
d23e243
Compare
Contributor
|
Merged thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is sufficient to compile warning-free with clang-tidy 22.