Skip to content

Disable more clang-tidy checks#564

Closed
gaul wants to merge 16 commits into
intel:thermald_nextfrom
gaul:error-prone/disable
Closed

Disable more clang-tidy checks#564
gaul wants to merge 16 commits into
intel:thermald_nextfrom
gaul:error-prone/disable

Conversation

@gaul
Copy link
Copy Markdown
Contributor

@gaul gaul commented May 6, 2026

This is sufficient to compile warning-free with clang-tidy 22.

gaul and others added 15 commits April 29, 2026 13:23
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>
@gaul gaul force-pushed the error-prone/disable branch from 638b173 to d41b487 Compare May 6, 2026 00:13
@gaul gaul changed the title Disable more error-prone checks Disable more clang-tidy checks May 6, 2026
@spandruvada spandruvada requested a review from Copilot May 7, 2026 17:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-tidy Makefile target to pass an explicit C++ standard and adjust header filtering behavior.
  • Disables additional bugprone-* checks in .clang-tidy to 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.

Comment thread Makefile.am Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@spandruvada
Copy link
Copy Markdown
Contributor

Merged thanks.

@gaul gaul deleted the error-prone/disable branch May 13, 2026 17:57
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.

3 participants