2009-02-10 Jeffrey Stedfast <fejj@novell.com>
authorJeffrey Stedfast <fejj@novell.com>
Tue, 10 Feb 2009 14:29:46 +0000 (14:29 -0000)
committerJeffrey Stedfast <fejj@novell.com>
Tue, 10 Feb 2009 14:29:46 +0000 (14:29 -0000)
* minizip/zip.c: Fix warnings about old-style paramater type
specifications.

* minizip/unzip.c Fix warnings about old-style paramater type
specifications.

svn path=/trunk/mono/; revision=126463

support/ChangeLog
support/minizip/crypt.h
support/minizip/unzip.c
support/minizip/zip.c

index ab96d24eda5ecfc831f19daa1d71bd0b12b20490..4f819714fba5a4e971ece334ece4ad130b4ffa85 100644 (file)
@@ -1,7 +1,11 @@
 2009-02-10  Jeffrey Stedfast  <fejj@novell.com>
 
-       * minizip/unzip.c (unzlocal_DosDateToTmuDate): Fix ambiguous
-       else's.
+       * minizip/zip.c: Fix warnings about old-style paramater type
+       specifications.
+
+       * minizip/unzip.c Fix warnings about old-style paramater type
+       specifications.
+       (unzlocal_DosDateToTmuDate): Fix ambiguous else's.
        (unzlocal_DosDateToTmuDate): Here too.
        (unzlocal_CheckCurrentFileCoherencyHeader): And here.
 
index 622f4bc2ec45de7c2916f64c22b7bfbc203f8809..c73e9d695aac8daa0fd2303c59edced76db0bb68 100644 (file)
@@ -87,13 +87,7 @@ static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned lon
 #    define ZCR_SEED2 3141592654UL     /* use PI as default pattern */
 #  endif
 
-static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
-    const char *passwd;         /* password string */
-    unsigned char *buf;         /* where to write header */
-    int bufSize;
-    unsigned long* pkeys;
-    const unsigned long* pcrc_32_tab;
-    unsigned long crcForCrypting;
+static int crypthead(const char *passwd, unsigned char *buf, int bufSize, unsigned long *pkeys, const unsigned long *pcrc_32_tab, unsigned long crcForCrypting)
 {
     int n;                       /* index in random header */
     int t;                       /* temporary */
index 9192b3518b78a1da0fda24c00a5b64af5f9b2cc8..0b98a87cd5b1557eb9b5bb7bda9e283482127f34 100644 (file)
@@ -259,9 +259,7 @@ local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX)
 
 
 /* My own strcmpi / strcasecmp */
-local int strcmpcasenosensitive_internal (fileName1,fileName2)
-    const char* fileName1;
-    const char* fileName2;
+local int strcmpcasenosensitive_internal (const char *fileName1, const char *fileName2)
 {
     for (;;)
     {
@@ -545,9 +543,7 @@ extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info)
 /*
    Translate date/time from Dos format to tm_unz (readable more easilty)
 */
-local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
-    uLong ulDosDate;
-    tm_unz* ptm;
+local void unzlocal_DosDateToTmuDate (uLong ulDosDate, tm_unz *ptm)
 {
     uLong uDate;
     uDate = (uLong)(ulDosDate>>16);
@@ -959,13 +955,9 @@ extern int ZEXPORT unzGoToFilePos(file, file_pos)
   store in *piSizeVar the size of extra info in local header
         (filename and size of extra field data)
 */
-local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
-                                                    poffset_local_extrafield,
-                                                    psize_local_extrafield)
-    unz_s* s;
-    uInt* piSizeVar;
-    uLong *poffset_local_extrafield;
-    uInt  *psize_local_extrafield;
+local int unzlocal_CheckCurrentFileCoherencyHeader (unz_s *s, uInt *piSizeVar,
+                                                    uLong *poffset_local_extrafield,
+                                                    uInt *psize_local_extrafield)
 {
     uLong uMagic,uData,uFlags;
     uLong size_filename;
@@ -1540,7 +1532,6 @@ extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
     char *szComment;
     uLong uSizeBuf;
 {
-    int err=UNZ_OK;
     unz_s* s;
     uLong uReadThis ;
     if (file==NULL)
index 7fbe0027437e794f14fd1f1d4287970d46573103..5acf49f58615f5de5d286993192d02c8a1c87067 100644 (file)
@@ -158,7 +158,7 @@ typedef struct
 #include "crypt.h"
 #endif
 
-local linkedlist_datablock_internal* allocate_new_datablock()
+local linkedlist_datablock_internal* allocate_new_datablock(void)
 {
     linkedlist_datablock_internal* ldi;
     ldi = (linkedlist_datablock_internal*)
@@ -172,8 +172,7 @@ local linkedlist_datablock_internal* allocate_new_datablock()
     return ldi;
 }
 
-local void free_datablock(ldi)
-    linkedlist_datablock_internal* ldi;
+local void free_datablock(linkedlist_datablock_internal *ldi)
 {
     while (ldi!=NULL)
     {
@@ -183,24 +182,19 @@ local void free_datablock(ldi)
     }
 }
 
-local void init_linkedlist(ll)
-    linkedlist_data* ll;
+local void init_linkedlist(linkedlist_data *ll)
 {
     ll->first_block = ll->last_block = NULL;
 }
 
-local void free_linkedlist(ll)
-    linkedlist_data* ll;
+local void free_linkedlist(linkedlist_data *ll)
 {
     free_datablock(ll->first_block);
     ll->first_block = ll->last_block = NULL;
 }
 
 
-local int add_data_in_datablock(ll,buf,len)
-    linkedlist_data* ll;
-    const void* buf;
-    uLong len;
+local int add_data_in_datablock(linkedlist_data *ll, const void *buf, uLong len)
 {
     linkedlist_datablock_internal* ldi;
     const unsigned char* from_copy;
@@ -315,9 +309,7 @@ local void ziplocal_putValue_inmemory (dest, x, nbByte)
 /****************************************************************************/
 
 
-local uLong ziplocal_TmzDateToDosDate(ptm,dosDate)
-    const tm_zip* ptm;
-    uLong dosDate;
+local uLong ziplocal_TmzDateToDosDate(const tm_zip *ptm, uLong dosDate)
 {
     uLong year = (uLong)ptm->tm_year;
     if (year>1980)
@@ -941,8 +933,7 @@ extern int ZEXPORT zipOpenNewFileInZip (file, filename, zipfi,
                                  comment, method, level, 0);
 }
 
-local int zipFlushWriteBuffer(zi)
-  zip_internal* zi;
+local int zipFlushWriteBuffer(zip_internal *zi)
 {
     int err=ZIP_OK;