]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
monetary_members.cc (_S_construct_pattern): Give __ret a default value, thus avoiding...
authorPaolo Carlini <pcarlini@suse.de>
Sun, 10 Oct 2004 17:55:23 +0000 (17:55 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 10 Oct 2004 17:55:23 +0000 (17:55 +0000)
2004-10-10  Paolo Carlini  <pcarlini@suse.de>

* config/locale/gnu/monetary_members.cc (_S_construct_pattern):
Give __ret a default value, thus avoiding spurious warnings.

* testsuite/performance/27_io/filebuf_sgetn_unbuf.cc: Open either
words or linux.words, otherwise exit.
* testsuite/performance/27_io/ifstream_getline.cc: Slighlty tweak.

From-SVN: r88848

libstdc++-v3/ChangeLog
libstdc++-v3/config/locale/gnu/monetary_members.cc
libstdc++-v3/testsuite/performance/27_io/filebuf_sgetn_unbuf.cc
libstdc++-v3/testsuite/performance/27_io/ifstream_getline.cc

index 19be8461c17a350b955b4fd31373992c64b297a4..38b332cd19d5136a2e3f6f0a7e7f5aa03c02301c 100644 (file)
@@ -1,3 +1,12 @@
+2004-10-10  Paolo Carlini  <pcarlini@suse.de>
+
+       * config/locale/gnu/monetary_members.cc (_S_construct_pattern):
+       Give __ret a default value, thus avoiding spurious warnings.
+
+       * testsuite/performance/27_io/filebuf_sgetn_unbuf.cc: Open either
+       words or linux.words, otherwise exit.
+       * testsuite/performance/27_io/ifstream_getline.cc: Slighlty tweak.
+
 2004-10-09  Paolo Carlini  <pcarlini@suse.de>
 
        * include/std/std_memory.h (__get_temporary_buffer): Don't use
index 947876cce457183b5b08b7267ed836710d703f71..20d96420192c86b1035f57d17db18942928de362 100644 (file)
@@ -199,7 +199,7 @@ namespace std
          }
        break;
       default:
-       ;
+       __ret = pattern();
       }
     return __ret;
   }
index 5741ab308bbabe3a28f8233a57092acb9531d057..1eddf10ad0268e859bd88ac2d058d118d952cd80 100644 (file)
@@ -42,10 +42,18 @@ int main()
   const int chunksize = 100;
 
   char* chunk = new char[chunksize];
-  const char* name = "/usr/share/dict/linux.words";
+  const char* name1 = "/usr/share/dict/words";
+  const char* name2 = "/usr/share/dict/linux.words";
+  const char* name = name1;
 
   // C
-  FILE* file = fopen(name, "r");
+  FILE* file;
+  if (!(file = fopen(name, "r")))
+    {
+      name = name2;
+      if (!(file = fopen(name, "r")))
+       exit(1);
+    }
   setvbuf(file, 0, _IONBF, 0);
   start_counters(time, resource);
   for (int i = 0; i < iterations; ++i)
index 5f745732a18b16cc18536936de3315c233dd3b16..feb9c8f8603f373dcd52fc5290064d05b5530a74 100644 (file)
@@ -46,14 +46,13 @@ int main ()
       in.clear();
       in.open(name2);
     }
+  if (!in.is_open())
+    exit(1);
 
   char buffer[BUFSIZ];
   start_counters(time, resource);
-  if (in.is_open())
-    {
-      while (in.good()) 
-       in.getline(buffer, BUFSIZ);
-    }
+  while (in.good()) 
+    in.getline(buffer, BUFSIZ);
   stop_counters(time, resource);
   report_performance(__FILE__, "", time, resource);