clang-tidy: Enable more warnings (#39910)

This commit is contained in:
Yu Watanabe
2026-01-03 06:00:30 +09:00
committed by GitHub
23 changed files with 107 additions and 82 deletions
+5 -5
View File
@@ -1135,17 +1135,17 @@ bool oom_score_adjust_is_valid(int oa) {
return oa >= OOM_SCORE_ADJ_MIN && oa <= OOM_SCORE_ADJ_MAX;
}
unsigned long personality_from_string(const char *p) {
unsigned long personality_from_string(const char *s) {
Architecture architecture;
if (!p)
if (!s)
return PERSONALITY_INVALID;
/* Parse a personality specifier. We use our own identifiers that indicate specific ABIs, rather than just
* hints regarding the register size, since we want to keep things open for multiple locally supported ABIs for
* the same register size. */
architecture = architecture_from_string(p);
architecture = architecture_from_string(s);
if (architecture < 0)
return PERSONALITY_INVALID;
@@ -1247,8 +1247,8 @@ bool nice_is_valid(int n) {
return n >= PRIO_MIN && n < PRIO_MAX;
}
bool sched_policy_is_valid(int i) {
return IN_SET(i, SCHED_OTHER, SCHED_BATCH, SCHED_IDLE, SCHED_FIFO, SCHED_RR, SCHED_EXT);
bool sched_policy_is_valid(int policy) {
return IN_SET(policy, SCHED_OTHER, SCHED_BATCH, SCHED_IDLE, SCHED_FIFO, SCHED_RR, SCHED_EXT);
}
bool sched_policy_supported(int policy) {