diff options
author | Paolo Carlini <pcarlini@suse.de> | 2004-10-10 17:55:23 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2004-10-10 17:55:23 +0000 |
commit | a780ad2f430e6aeb6e2c7b9dca9093ba5e2ff6e9 (patch) | |
tree | 0c896c6c52dbc1d62fd55da7e576c7cbb9a4db73 | |
parent | 0ba09d8fc65f306909c11b68c67030a3c6ca13c2 (diff) | |
download | gcc-a780ad2f430e6aeb6e2c7b9dca9093ba5e2ff6e9.zip gcc-a780ad2f430e6aeb6e2c7b9dca9093ba5e2ff6e9.tar.gz gcc-a780ad2f430e6aeb6e2c7b9dca9093ba5e2ff6e9.tar.bz2 |
monetary_members.cc (_S_construct_pattern): Give __ret a default value, thus avoiding spurious warnings.
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
4 files changed, 24 insertions, 8 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 19be846..38b332c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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 diff --git a/libstdc++-v3/config/locale/gnu/monetary_members.cc b/libstdc++-v3/config/locale/gnu/monetary_members.cc index 947876c..20d9642 100644 --- a/libstdc++-v3/config/locale/gnu/monetary_members.cc +++ b/libstdc++-v3/config/locale/gnu/monetary_members.cc @@ -199,7 +199,7 @@ namespace std } break; default: - ; + __ret = pattern(); } return __ret; } diff --git a/libstdc++-v3/testsuite/performance/27_io/filebuf_sgetn_unbuf.cc b/libstdc++-v3/testsuite/performance/27_io/filebuf_sgetn_unbuf.cc index 5741ab3..1eddf10 100644 --- a/libstdc++-v3/testsuite/performance/27_io/filebuf_sgetn_unbuf.cc +++ b/libstdc++-v3/testsuite/performance/27_io/filebuf_sgetn_unbuf.cc @@ -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) diff --git a/libstdc++-v3/testsuite/performance/27_io/ifstream_getline.cc b/libstdc++-v3/testsuite/performance/27_io/ifstream_getline.cc index 5f74573..feb9c8f 100644 --- a/libstdc++-v3/testsuite/performance/27_io/ifstream_getline.cc +++ b/libstdc++-v3/testsuite/performance/27_io/ifstream_getline.cc @@ -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); |