Commit 424a8882 authored by Yang Tse's avatar Yang Tse
Browse files

fix warnings

parent 3fdced35
Loading
Loading
Loading
Loading
+20 −8
Original line number Diff line number Diff line
@@ -2359,9 +2359,18 @@ sub singletest {
        $DBGCURL=$CMDLINE;
    }

    my $usevalgrind = $valgrind && ((getpart("verify", "valgrind"))[0] !~ /disable/);
    if($usevalgrind) {
        $CMDLINE = "$valgrind ".$valgrind_tool."--leak-check=yes --num-callers=16 ${valgrind_logfile}=$LOGDIR/valgrind$testnum $CMDLINE";
    my $usevalgrind;
    if($valgrind) {
        my @valgrindoption = getpart("verify", "valgrind");
        if((!@valgrindoption) || ($valgrindoption[0] !~ /disable/)) {
            $usevalgrind = 1;
            my $valgrindcmd = "$valgrind ";
            $valgrindcmd .= "$valgrind_tool " if($valgrind_tool);
            $valgrindcmd .= "--leak-check=yes ";
            $valgrindcmd .= "--num-callers=16 ";
            $valgrindcmd .= "${valgrind_logfile}=$LOGDIR/valgrind$testnum";
            $CMDLINE = "$valgrindcmd $CMDLINE";
        }
    }

    $CMDLINE .= "$cmdargs >>$STDOUT 2>>$STDERR";
@@ -2823,7 +2832,7 @@ sub singletest {
            my $f;
            my $l;
            foreach $f (@files) {
                if($f =~ /^valgrind$testnum\.pid/) {
                if($f =~ /^valgrind$testnum\./) {
                    $l = $f;
                    last;
                }
@@ -3476,11 +3485,14 @@ if($valgrind) {
        # cut off all but digits and dots
        $ver =~ s/[^0-9.]//g;

        if($ver =~ /^(\d+)/) {
            $ver = $1;
            if($ver >= 3) {
                $valgrind_logfile="--log-file";
            }
        }
    }
}

if ($gdbthis) {
    # open the executable curl and read the first 4 bytes of it
@@ -3658,7 +3670,7 @@ sub displaylogs {
        if(($log =~ /^file\d+\.txt/) && ($log !~ /^file$testnum\.txt/)) {
            next; # skip fileNnn.txt of other tests
        }
        if(($log =~ /^valgrind\d+/) && ($log !~ /^valgrind$testnum/)) {
        if(($log =~ /^valgrind\d+/) && ($log !~ /^valgrind$testnum\./)) {
            next; # skip valgrindNnn of other tests
        }
        logmsg "=== Start of file $log\n";