diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2015-01-30 09:29:42 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2015-01-30 09:29:42 -0330 |
commit | 0a2a4d818fb5c276e6ba008c29b591683d5025bd (patch) | |
tree | bef463540bcd1ba853b75c8f265845251e819fd6 /cpp/demo/Freeze/backup/Client.cpp | |
parent | Fixed (ICE-6276) - Add support for JavaScript source maps (diff) | |
download | ice-0a2a4d818fb5c276e6ba008c29b591683d5025bd.tar.bz2 ice-0a2a4d818fb5c276e6ba008c29b591683d5025bd.tar.xz ice-0a2a4d818fb5c276e6ba008c29b591683d5025bd.zip |
ICE-5814 allow demos to be built with /W4 on Windows
Diffstat (limited to 'cpp/demo/Freeze/backup/Client.cpp')
-rw-r--r-- | cpp/demo/Freeze/backup/Client.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/cpp/demo/Freeze/backup/Client.cpp b/cpp/demo/Freeze/backup/Client.cpp index 86bf0e6f579..8e2502dffe8 100644 --- a/cpp/demo/Freeze/backup/Client.cpp +++ b/cpp/demo/Freeze/backup/Client.cpp @@ -39,11 +39,11 @@ main(int argc, char* argv[]) Freeze::ConnectionPtr connection = Freeze::createConnection(communicator, "backup"); IntLongMap m(connection, "IntLongMap", true); - + const int size = 10000; if(m.size() == 0) - { + { cout << "********* Creating new map ***********" << endl; Freeze::TransactionHolder txHolder(connection); @@ -56,7 +56,7 @@ main(int argc, char* argv[]) } txHolder.commit(); } - + cout << "Updating map" << endl; for(;;) @@ -76,23 +76,26 @@ main(int argc, char* argv[]) cerr << "old time (ms) == " << oldMs << endl; cerr << "current current (ms) == " << p->second << endl; } - + test(p->second == oldMs); p.set(ms); count++; } while(++p != m.end()); - cout << "Read " << IceUtil::Time::milliSeconds(oldMs).toDateTime() << " in all records;" + cout << "Read " << IceUtil::Time::milliSeconds(oldMs).toDateTime() << " in all records;" << " updating with " << time.toDateTime() << " ... " << flush; - + txHolder.commit(); cout << "done" << endl; test(count == size); } - connection->close(); - - communicator->destroy(); + // + // Since above loop never exits this code is unreachable and causes + // warnings with some compilers. + // + //connection->close(); + //communicator->destroy(); return EXIT_SUCCESS; } |