From ec56662ba7b4cfaf1335a88854127fac06f376aa Mon Sep 17 00:00:00 2001 From: weidai Date: Thu, 20 Mar 2003 20:39:59 +0000 Subject: fix warnings for VC7 and GCC git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@43 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- datatest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'datatest.cpp') diff --git a/datatest.cpp b/datatest.cpp index eac1d7f..5d84c01 100644 --- a/datatest.cpp +++ b/datatest.cpp @@ -281,6 +281,7 @@ void TestDigestOrMAC(TestData &v, bool testDigest) bool GetField(std::istream &is, std::string &name, std::string &value) { + name.clear(); is >> name; if (name.empty()) return false; @@ -293,8 +294,8 @@ bool GetField(std::istream &is, std::string &name, std::string &value) is.ignore(1); // VC60 workaround: getline bug - char buffer[4]; - value.resize(0); + char buffer[128]; + value.clear(); bool continueLine; do @@ -421,7 +422,7 @@ void TestDataFile(const std::string &filename, unsigned int &totalTests, unsigne failedTests++; } else - cout << "."; + cout << "." << flush; totalTests++; } -- cgit v1.2.1