From: <lab...@us...> - 2015-05-27 11:25:43
|
Revision: 1530 http://sourceforge.net/p/opengtoolkit/svn/1530 Author: labviewer Date: 2015-05-27 11:25:40 +0000 (Wed, 27 May 2015) Log Message: ----------- Fix some minor 64 bit implicit conversion warnings Modified Paths: -------------- trunk/lvzip/c_source/bzip2/compress.c trunk/lvzip/c_source/crypt.h trunk/lvzip/c_source/ioapi.c trunk/lvzip/c_source/iowin.c trunk/lvzip/c_source/zip.c Modified: trunk/lvzip/c_source/bzip2/compress.c =================================================================== --- trunk/lvzip/c_source/bzip2/compress.c 2015-05-27 11:12:39 UTC (rev 1529) +++ trunk/lvzip/c_source/bzip2/compress.c 2015-05-27 11:25:40 UTC (rev 1530) @@ -202,7 +202,7 @@ *ryy_j = rtmp2; }; yy[0] = rtmp; - j = ryy_j - &(yy[0]); + j = (Int32)(ryy_j - &(yy[0])); mtfv[wr] = j+1; wr++; s->mtfFreq[j+1]++; } Modified: trunk/lvzip/c_source/crypt.h =================================================================== --- trunk/lvzip/c_source/crypt.h 2015-05-27 11:12:39 UTC (rev 1529) +++ trunk/lvzip/c_source/crypt.h 2015-05-27 11:25:40 UTC (rev 1530) @@ -34,7 +34,7 @@ /*********************************************************************** * Return the next byte in the pseudo-random sequence */ -static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) +static int decrypt_byte(unsigned long* pkeys /*, const z_crc_t* pcrc_32_tab*/) { unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an * unpredictable manner on 16-bit systems; not a problem @@ -75,10 +75,10 @@ } #define zdecode(pkeys,pcrc_32_tab,c) \ - (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab))) + (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys /*,pcrc_32_tab*/))) #define zencode(pkeys,pcrc_32_tab,c,t) \ - (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c)) + (t=decrypt_byte(pkeys /*,pcrc_32_tab*/), update_keys(pkeys,pcrc_32_tab,c), t^(c)) #ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED Modified: trunk/lvzip/c_source/ioapi.c =================================================================== --- trunk/lvzip/c_source/ioapi.c 2015-05-27 11:12:39 UTC (rev 1529) +++ trunk/lvzip/c_source/ioapi.c 2015-05-27 11:25:40 UTC (rev 1530) @@ -114,7 +114,7 @@ return NULL; ioposix = (FILE_IOPOSIX*)malloc(sizeof(FILE_IOPOSIX)); ioposix->file = file; - ioposix->filenameLength = strlen(filename) + 1; + ioposix->filenameLength = (int)strlen(filename) + 1; ioposix->filename = (char*)malloc(ioposix->filenameLength * sizeof(char)); memcpy(ioposix->filename, filename, ioposix->filenameLength); return (voidpf)ioposix; Modified: trunk/lvzip/c_source/iowin.c =================================================================== --- trunk/lvzip/c_source/iowin.c 2015-05-27 11:12:39 UTC (rev 1529) +++ trunk/lvzip/c_source/iowin.c 2015-05-27 11:25:40 UTC (rev 1530) @@ -83,13 +83,13 @@ if ((hFile != NULL) && (hFile != INVALID_HANDLE_VALUE)) { - int len = wcslen(filename); + size_t len = wcslen(filename); w32fiow = (WIN32FILE_IOWIN *)malloc(sizeof(WIN32FILE_IOWIN) + len); if (w32fiow) { w32fiow->hf = hFile; w32fiow->error = 0; - w32fiow->filenameLength = len; + w32fiow->filenameLength = (int)len; wcsncpy(w32fiow->filename, filename, len + 1); } else Modified: trunk/lvzip/c_source/zip.c =================================================================== --- trunk/lvzip/c_source/zip.c 2015-05-27 11:12:39 UTC (rev 1529) +++ trunk/lvzip/c_source/zip.c 2015-05-27 11:25:40 UTC (rev 1530) @@ -1463,16 +1463,16 @@ zi->ci.pcrc_32_tab = get_crc_table(); /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/ - sizeHead = crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); + sizeHead = crypthead(password, bufHead, RAND_HEAD_LEN, zi->ci.keys, zi->ci.pcrc_32_tab, crcForCrypting); zi->ci.crypt_header_size = sizeHead; - if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) + if (ZWRITE64(zi->z_filefunc, zi->filestream, bufHead, sizeHead) != sizeHead) err = ZIP_ERRNO; } #endif } - if (err==Z_OK) + if (err == Z_OK) zi->in_opened_file_inzip = 1; return err; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |