Code

remove warnings
authorishmal <ishmal@users.sourceforge.net>
Fri, 14 Apr 2006 19:04:20 +0000 (19:04 +0000)
committerishmal <ishmal@users.sourceforge.net>
Fri, 14 Apr 2006 19:04:20 +0000 (19:04 +0000)
src/dom/util/ziptool.cpp
src/dom/util/ziptool.h

index 701b9d9eba17c77aef449c79b59312065dcbdd95..e6d46557b6d753b4fe939172bca6af8e54952262 100644 (file)
@@ -1539,7 +1539,7 @@ bool GzipFile::write()
     putByte(0);\r
 \r
     //file name\r
-    for (int i=0 ; i<fileName.size() ; i++)\r
+    for (unsigned int i=0 ; i<fileName.size() ; i++)\r
         putByte(fileName[i]);\r
     putByte(0);\r
 \r
@@ -1662,12 +1662,12 @@ bool GzipFile::read()
     //## compression method\r
     if (!getByte(&ch))\r
         return false;\r
-    int cm = ch & 0xff;\r
+    compressionMethod = ch & 0xff;\r
 \r
     //## flags\r
     if (!getByte(&ch))\r
         return false;\r
-    bool ftext    = ch & 0x01;\r
+    //bool ftext    = ch & 0x01;\r
     bool fhcrc    = ch & 0x02;\r
     bool fextra   = ch & 0x04;\r
     bool fname    = ch & 0x08;\r
@@ -1680,17 +1680,17 @@ bool GzipFile::read()
     unsigned long ltime;\r
     if (!getLong(&ltime))\r
         return false;\r
-    time_t mtime = (time_t)ltime;\r
+    //time_t mtime = (time_t)ltime;\r
 \r
     //## XFL\r
     if (!getByte(&ch))\r
         return false;\r
-    int xfl = ch;\r
+    //int xfl = ch;\r
 \r
     //## OS\r
     if (!getByte(&ch))\r
         return false;\r
-    int os = ch;\r
+    //int os = ch;\r
 \r
     //std::string timestr = ctime(&mtime);\r
     //trace("xfl:%d os:%d mtime:%s", xfl, os, timestr.c_str());\r
index 88631c997a0bb31b2d005d0e2408a7232a38cd20..71f982e1b4d401fa0b46851606b1f3703ee35e75 100644 (file)
@@ -216,6 +216,8 @@ private:
 \r
     bool putByte(unsigned char ch);\r
     bool putLong(unsigned long val);\r
+\r
+    int compressionMethod;\r
 };\r
 \r
 \r