suppress warnings when the test for the arch-test binary fails

This commit is contained in:
Johannes 'josch' Schauer 2018-10-02 04:11:41 +02:00
parent edb3c9ed9a
commit d25e939363
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -1282,7 +1282,10 @@ sub main() {
if ($hostarch ne $nativearch) {
my $pid = open my $fh, '-|' // die "failed to fork(): $!";
if ($pid == 0) {
{ exec 'arch-test', '-n', $nativearch; }
{
no warnings; # don't print a warning if the following fails
exec 'arch-test', '-n', $nativearch;
}
# if exec didn't work (for example because the arch-test program is
# missing) prepare for the worst and assume that the architecture
# cannot be executed