瀏覽代碼

2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compilation warnings
* test/DataTest.cc
* test/HttpRequestTest.cc
* test/MetaFileUtilTest.cc
* test/RequestTest.cc

Tatsuhiro Tsujikawa 18 年之前
父節點
當前提交
4b5ad58219
共有 5 個文件被更改,包括 16 次插入12 次删除
  1. 6 0
      ChangeLog
  2. 0 1
      test/DataTest.cc
  3. 0 1
      test/HttpRequestTest.cc
  4. 4 4
      test/MetaFileUtilTest.cc
  5. 6 6
      test/RequestTest.cc

+ 6 - 0
ChangeLog

@@ -2,6 +2,12 @@
 
 	Removed unnecessary string copy. Updated doc and corrected indentation.
 	* src/Base64.cc
+
+	Fixed compilation warnings
+	* test/DataTest.cc
+	* test/HttpRequestTest.cc
+	* test/MetaFileUtilTest.cc
+	* test/RequestTest.cc
 	
 	* Release 0.12.0
 

+ 0 - 1
test/DataTest.cc

@@ -37,7 +37,6 @@ void DataTest::testToString() {
 
 void DataTest::testGetData() {
   Data data("aria2", 5);
-  int len;
   CPPUNIT_ASSERT_EQUAL(0, memcmp("aria2", data.getData(), 5));
   CPPUNIT_ASSERT_EQUAL((int32_t)5, data.getLen());  
 

+ 0 - 1
test/HttpRequestTest.cc

@@ -55,7 +55,6 @@ void HttpRequestTest::testGetEndByte()
   int32_t index = 1;
   int32_t length = 1024*1024-1024;
   int32_t segmentLength = 1024*1024;
-  int32_t writtenLength = 1024;
 
   HttpRequest httpRequest;
   SegmentHandle segment = new PiecedSegment(segmentLength,

+ 4 - 4
test/MetaFileUtilTest.cc

@@ -36,7 +36,7 @@ void MetaFileUtilTest::testParseMetaFile() {
 void MetaFileUtilTest::testBdecoding() {
   try {
     const char* str = "5:abcd";
-    MetaEntry* entry = MetaFileUtil::bdecoding(str, strlen(str));
+    MetaFileUtil::bdecoding(str, strlen(str));
     CPPUNIT_FAIL("DlAbortEx exception must be thrown.");
   } catch(DlAbortEx* ex) {
     delete ex;
@@ -46,7 +46,7 @@ void MetaFileUtilTest::testBdecoding() {
 
   try {
     const char* str = "i1234";
-    MetaEntry* entry = MetaFileUtil::bdecoding(str, strlen(str));
+    MetaFileUtil::bdecoding(str, strlen(str));
     CPPUNIT_FAIL("DlAbortEx exception must be thrown.");
   } catch(DlAbortEx* ex) {
     delete ex;
@@ -56,7 +56,7 @@ void MetaFileUtilTest::testBdecoding() {
 
   try {
     const char* str = "5abcd";
-    MetaEntry* entry = MetaFileUtil::bdecoding(str, strlen(str));
+    MetaFileUtil::bdecoding(str, strlen(str));
     CPPUNIT_FAIL("DlAbortEx exception must be thrown.");
   } catch(DlAbortEx* ex) {
     delete ex;
@@ -66,7 +66,7 @@ void MetaFileUtilTest::testBdecoding() {
 
   try {
     const char* str = "d";
-    MetaEntry* entry = MetaFileUtil::bdecoding(str, strlen(str));
+    MetaFileUtil::bdecoding(str, strlen(str));
     CPPUNIT_FAIL("DlAbortEx exception must be thrown.");
   } catch(DlAbortEx* ex) {
     delete ex;

+ 6 - 6
test/RequestTest.cc

@@ -257,7 +257,7 @@ void RequestTest::testSetUrl17()
 void RequestTest::testRedirectUrl() {
   Request req;
   req.setKeepAlive(true);
-  bool v = req.setUrl("http://aria.rednoah.com:8080/aria2/index.html");
+  req.setUrl("http://aria.rednoah.com:8080/aria2/index.html");
   
   bool v2 = req.redirectUrl("http://aria.rednoah.co.jp/");
   CPPUNIT_ASSERT(v2);
@@ -279,19 +279,19 @@ void RequestTest::testRedirectUrl() {
 
 void RequestTest::testRedirectUrl2() {
   Request req;
-  bool v = req.setUrl("http://aria.rednoah.com/download.html");
+  req.setUrl("http://aria.rednoah.com/download.html");
   CPPUNIT_ASSERT_EQUAL(string(""), req.getPreviousUrl());
   req.setReferer("http://aria.rednoah.com/");
   // previousUrl is updated when referer is specified
   CPPUNIT_ASSERT_EQUAL(string("http://aria.rednoah.com/"), req.getPreviousUrl());
-  bool v2 = req.redirectUrl("http://aria.rednoah.com/403.html");
+  req.redirectUrl("http://aria.rednoah.com/403.html");
 
   // previousUrl must be "" when redirection
   CPPUNIT_ASSERT_EQUAL(string(""), req.getPreviousUrl());
   // referer is unchagned
   CPPUNIT_ASSERT_EQUAL(string("http://aria.rednoah.com/"), req.getReferer());
 
-  bool v3 = req.redirectUrl("http://aria.rednoah.com/error.html");
+  req.redirectUrl("http://aria.rednoah.com/error.html");
 
   // previousUrl must be "" when redirection
   CPPUNIT_ASSERT_EQUAL(string(""), req.getPreviousUrl());
@@ -299,9 +299,9 @@ void RequestTest::testRedirectUrl2() {
   
 void RequestTest::testResetUrl() {
   Request req;
-  bool v = req.setUrl("http://aria.rednoah.com:8080/aria2/index.html");
+  req.setUrl("http://aria.rednoah.com:8080/aria2/index.html");
   req.setReferer("http://aria.rednoah.com:8080/");
-  bool v2 = req.redirectUrl("ftp://aria.rednoah.co.jp/");
+  req.redirectUrl("ftp://aria.rednoah.co.jp/");
 
   bool v3 = req.resetUrl();
   CPPUNIT_ASSERT(v3);