QuaZip: change the order of void-casts.
MSVC requires void-casting of unused variables to be done after variable definitions. Change the order, no functional changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31171 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
16f48e8ebc
commit
6bc8916a58
3 changed files with 11 additions and 11 deletions
|
@ -34,10 +34,10 @@
|
|||
*/
|
||||
static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
|
||||
{
|
||||
(void) pcrc_32_tab; /* avoid "unused parameter" warning */
|
||||
unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
|
||||
* unpredictable manner on 16-bit systems; not a problem
|
||||
* with any known compiler so far, though */
|
||||
(void) pcrc_32_tab; /* avoid "unused parameter" warning */
|
||||
|
||||
temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
|
||||
return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
|
||||
|
|
|
@ -70,10 +70,10 @@ voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
|
|||
const char* filename;
|
||||
int mode;
|
||||
{
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
FILE* file = NULL;
|
||||
const char* mode_fopen = NULL;
|
||||
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
|
||||
mode_fopen = "rb";
|
||||
else
|
||||
if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
|
||||
|
@ -94,8 +94,8 @@ uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
|
|||
void* buf;
|
||||
uLong size;
|
||||
{
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
uLong ret;
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
@ -107,8 +107,8 @@ uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
|
|||
const void* buf;
|
||||
uLong size;
|
||||
{
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
uLong ret;
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
@ -117,8 +117,8 @@ long ZCALLBACK ftell_file_func (opaque, stream)
|
|||
voidpf opaque;
|
||||
voidpf stream;
|
||||
{
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
long ret;
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
ret = ftell((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
@ -129,9 +129,9 @@ long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
|
|||
uLong offset;
|
||||
int origin;
|
||||
{
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
int fseek_origin=0;
|
||||
long ret;
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
switch (origin)
|
||||
{
|
||||
case ZLIB_FILEFUNC_SEEK_CUR :
|
||||
|
@ -154,8 +154,8 @@ int ZCALLBACK fclose_file_func (opaque, stream)
|
|||
voidpf opaque;
|
||||
voidpf stream;
|
||||
{
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
int ret;
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
ret = fclose((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
@ -164,8 +164,8 @@ int ZCALLBACK ferror_file_func (opaque, stream)
|
|||
voidpf opaque;
|
||||
voidpf stream;
|
||||
{
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
int ret;
|
||||
(void) opaque; /* avoid "unused parameter" warning */
|
||||
ret = ferror((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -320,9 +320,9 @@ local uLong ziplocal_TmzDateToDosDate(ptm,dosDate)
|
|||
const tm_zip* ptm;
|
||||
uLong dosDate;
|
||||
{
|
||||
(void) dosDate; /* avoid "unused parameter" warning */
|
||||
uLong year = (uLong)ptm->tm_year;
|
||||
if (year>1980)
|
||||
(void) dosDate; /* avoid "unused parameter" warning */
|
||||
if (year>1980)
|
||||
year-=1980;
|
||||
else if (year>80)
|
||||
year-=80;
|
||||
|
|
Loading…
Reference in a new issue