]> git.saurik.com Git - bison.git/commitdiff
tests: check fclose's return value.
authorAkim Demaille <demaille@gostai.com>
Sat, 10 Apr 2010 11:38:37 +0000 (13:38 +0200)
committerAkim Demaille <demaille@gostai.com>
Tue, 13 Apr 2010 21:31:52 +0000 (23:31 +0200)
* tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.

ChangeLog
tests/calc.at

index 5e38cd0ce978c6b56591ccdf3127539ae6b24c91..bc9cbc974e7f11a654d726d42558d31b9586ca30 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-13  Akim Demaille  <demaille@gostai.com>
+
+       tests: check fclose's return value.
+       * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
+
 2010-04-13  Akim Demaille  <demaille@gostai.com>
 
        tests: don't depend on the actual location type.
index 2f85baa47ef5b70f0396fd272704de7493f2fe88..f102f952c53724b90cc4dc35247bd88709c65098 100644 (file)
@@ -346,7 +346,8 @@ main (int argc, const char **argv)
 ]AT_SKEL_CC_IF([], [m4_bmatch([$4], [%debug],
 [  yydebug = 1;])])[
   status = yyparse (]AT_PARAM_IF([[&result, &count]])[);
-  fclose (input);
+  if (fclose (input))
+    perror ("fclose");
   if (global_result != result)
     abort ();
   if (global_count != count)