scripts: harden / tidy up more Perl system() calls

Closes #21007
This commit is contained in:
Viktor Szakats 2026-03-19 12:19:04 +01:00
parent 31add10322
commit 51f813308e
No known key found for this signature in database
10 changed files with 22 additions and 22 deletions

View file

@ -135,4 +135,4 @@ foreach my $v (keys %remove) {
}
# return the exit code from diff
exit system("diff -u /tmp/autotools /tmp/cmake") >> 8;
exit system('diff', ('-u', '/tmp/autotools', '/tmp/cmake')) >> 8;

View file

@ -37,12 +37,12 @@ if(!@files || $files[0] eq "-h") {
}
sub testcompile {
my $rc = system("gcc -c test.c -I include -W -Wall -pedantic -Werror -Wno-unused-parameter -Wno-unused-but-set-variable -DCURL_ALLOW_OLD_MULTI_SOCKET -DCURL_DISABLE_DEPRECATION") >> 8;
my $rc = system('gcc -c test.c -I include -W -Wall -pedantic -Werror -Wno-unused-parameter -Wno-unused-but-set-variable -DCURL_ALLOW_OLD_MULTI_SOCKET -DCURL_DISABLE_DEPRECATION') >> 8;
return $rc;
}
sub checksrc {
my $rc = system("$check test.c") >> 8;
my $rc = system($check, ('test.c')) >> 8;
return $rc;
}

View file

@ -35,7 +35,7 @@ if(!@files || $files[0] eq "-h") {
}
sub testcompile {
my $rc = system("gcc -c test.c -I include -W -Wall -pedantic -Werror -DCURL_ALLOW_OLD_MULTI_SOCKET -DCURL_DISABLE_TYPECHECK") >> 8;
my $rc = system('gcc -c test.c -I include -W -Wall -pedantic -Werror -DCURL_ALLOW_OLD_MULTI_SOCKET -DCURL_DISABLE_TYPECHECK') >> 8;
return $rc;
}