Commit 8d97b333 authored by Yang Tse's avatar Yang Tse
Browse files

fix warnings
parent b51b703a
Loading
Loading
Loading
Loading
+44 −36
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ BEGIN {
}

use strict;
#use warnings;
use warnings;
use Cwd;

# Subs imported from serverhelp module
@@ -174,7 +174,7 @@ my $pwd = getcwd(); # current working directory

my $start;
my $forkserver=0;
my $ftpchecktime; # time it took to verify our test FTP server
my $ftpchecktime=1; # time it took to verify our test FTP server

my $stunnel = checkcmd("stunnel4") || checkcmd("stunnel");
my $valgrind = checktestcmd("valgrind");
@@ -627,9 +627,11 @@ sub stopserver {
    # kill given pids and server relative ones clearing them in %run hash
    #
    foreach my $server (@killservers) {
        if($run{$server}) {
            $pidlist .= "$run{$server} ";
            $run{$server} = 0;
        }
    }
    killpid($verbose, $pidlist);
    #
    # cleanup server pid files
@@ -704,7 +706,7 @@ sub verifyftp {
    my ($proto, $ip, $port, $ipvnum, $idnum) = @_;
    my $pid;
    my $time=time();
    my $extra;
    my $extra="";
    if($proto eq "ftps") {
    	$extra .= "--insecure --ftp-ssl-control ";
    }
@@ -2133,6 +2135,7 @@ sub singletest {

    if(!$why) {
        my @precheck = getpart("client", "precheck");
        if(@precheck) {
            $cmd = $precheck[0];
            chomp $cmd;
            subVariables \$cmd;
@@ -2147,6 +2150,7 @@ sub singletest {
                logmsg "prechecked $cmd\n" if($verbose);
            }
        }
    }

    if($why && !$listonly) {
        # there's a problem, count it as "skipped"
@@ -2286,7 +2290,7 @@ sub singletest {

    my $out="";

    if($cmdhash{'option'} !~ /no-output/) {
    if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-output/)) {
        #We may slap on --output!
        if (!@validstdout) {
            $out=" --output $CURLOUT ";
@@ -2504,9 +2508,11 @@ sub singletest {
        #
        my $pidlist;
        foreach my $server (@killservers) {
            if($run{$server}) {
                $pidlist .= "$run{$server} ";
                $run{$server} = 0;
            }
        }
        killpid($verbose, $pidlist);
        #
        # cleanup server pid files
@@ -2527,6 +2533,7 @@ sub singletest {

    # run the postcheck command
    my @postcheck= getpart("client", "postcheck");
    if(@postcheck) {
        $cmd = $postcheck[0];
        chomp $cmd;
        subVariables \$cmd;
@@ -2542,6 +2549,7 @@ sub singletest {
                return 1;
            }
        }
    }

    my $e;
    for $e (@envs) {
@@ -2574,7 +2582,7 @@ sub singletest {

        # get the mode attribute
        my $filemode=$hash{'mode'};
        if(($filemode eq "text") && $has_textaware) {
        if($filemode && ($filemode eq "text") && $has_textaware) {
            # text mode when running on windows: fix line endings
            map s/\r\n/\n/g, @actual;
        }
@@ -2604,7 +2612,7 @@ sub singletest {
        my %hash = getpartattr("reply", "data");
        # get the mode attribute
        my $filemode=$hash{'mode'};
        if(($filemode eq "text") && $has_textaware) {
        if($filemode && ($filemode eq "text") && $has_textaware) {
            # text mode when running on windows: fix line endings
            map s/\r\n/\n/g, @out;
        }
@@ -2704,7 +2712,7 @@ sub singletest {
        my @stripfile = getpart("verify", "stripfile");

        my $filemode=$hash{'mode'};
        if(($filemode eq "text") && $has_textaware) {
        if($filemode && ($filemode eq "text") && $has_textaware) {
            # text mode when running on windows means adding an extra
            # strip expression
            push @stripfile, "s/\r\n/\n/";
@@ -3648,7 +3656,7 @@ my $failed;
my $testnum;
my $ok=0;
my $total=0;
my $lasttest;
my $lasttest=0;
my @at = split(" ", $TESTCASES);
my $count=0;