Set errcnt and warncnt to 0 in run_host_cmd_yesno
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 26 Jul 2015 18:55:57 +0000 (11:55 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 26 Jul 2015 18:55:57 +0000 (11:55 -0700)
run_host_cmd_yesno should set errcnt and warncnt to 0.  Otherwise, they
may leak to the next run.

* lib/ld-lib.exp (run_host_cmd_yesno): Set errcnt and warncnt
to 0.

ld/testsuite/ChangeLog
ld/testsuite/lib/ld-lib.exp

index 5df40669192ab7e18c2a76c07b72ffab27a4cb31..cd137f9c6ec233d91ab435a836256ac77ed80069 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * lib/ld-lib.exp (run_host_cmd_yesno): Set errcnt and warncnt
+       to 0.
+
 2015-07-25  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/18718
index 0cab4d3946a9db34f16e5a6650b1e115039b5b42..6f71e97f7e7674e685b64dba45301d714283f7f6 100644 (file)
@@ -125,8 +125,12 @@ proc run_host_cmd { prog command } {
 
 proc run_host_cmd_yesno { prog command } {
     global exec_output
+    global errcnt warncnt
 
     set exec_output [prune_warnings [run_host_cmd "$prog" "$command"]]
+    # Ignore error and warning.
+    set errcnt 0
+    set warncnt 0
     if [string match "" $exec_output] then {
        return 1;
     }
This page took 0.029862 seconds and 4 git commands to generate.