← Commit list

0180b57aa

Denys Vlasenko
Denys Vlasenko
2017-08-29
SUCCESS Duration: 143s

Subject

setpriv: placete "declaration of 'index' shadows a global declaration" warning

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/setpriv.c+4 -4
@@ -173,14 +173,14 @@ static void set_ambient_caps(char *string)
cap = strtok(string, ",");
while (cap) {
- unsigned index;
+ unsigned idx;
- index = parse_cap(cap);
+ idx = parse_cap(cap);
if (cap[0] == '+') {
- if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, index, 0, 0) < 0)
+ if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, idx, 0, 0) < 0)
bb_perror_msg("cap_ambient_raise");
} else {
- if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_LOWER, index, 0, 0) < 0)
+ if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_LOWER, idx, 0, 0) < 0)
bb_perror_msg("cap_ambient_lower");
}
cap = strtok(NULL, ",");