fix some easy warnings

This commit is contained in:
Rudolf Polzer 2013-06-19 18:50:07 +02:00
parent 06afddfe80
commit 847a61d888
4 changed files with 11 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -287,13 +287,13 @@ static void j_putRGBAScanline( unsigned char* jpegline, int widthPix, unsigned c
for ( count = 0; count < widthPix; count++ ) for ( count = 0; count < widthPix; count++ )
{ {
unsigned char iRed, iBlu, iGrn, iAlp; unsigned char iRed, iBlu, iGrn /* , iAlp */;
unsigned char *oRed, *oBlu, *oGrn, *oAlp; unsigned char *oRed, *oBlu, *oGrn, *oAlp;
iRed = *( jpegline + count * 4 + 0 ); iRed = *( jpegline + count * 4 + 0 );
iGrn = *( jpegline + count * 4 + 1 ); iGrn = *( jpegline + count * 4 + 1 );
iBlu = *( jpegline + count * 4 + 2 ); iBlu = *( jpegline + count * 4 + 2 );
iAlp = *( jpegline + count * 4 + 3 ); /* iAlp = *( jpegline + count * 4 + 3 ); */
oRed = outBuf + offset + count * 4 + 0; oRed = outBuf + offset + count * 4 + 0;
oGrn = outBuf + offset + count * 4 + 1; oGrn = outBuf + offset + count * 4 + 1;

View File

@ -1644,11 +1644,12 @@ static int unzlocal_GetCurrentFileInfoInternal (unzFile file,
/* we check the magic */ /* we check the magic */
if (err==UNZ_OK) if (err==UNZ_OK) {
if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK) if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
err=UNZ_ERRNO; err=UNZ_ERRNO;
else if (uMagic!=0x02014b50) else if (uMagic!=0x02014b50)
err=UNZ_BADZIPFILE; err=UNZ_BADZIPFILE;
}
if (unzlocal_getShort(s->file,&file_info.version) != UNZ_OK) if (unzlocal_getShort(s->file,&file_info.version) != UNZ_OK)
err=UNZ_ERRNO; err=UNZ_ERRNO;
@ -1724,11 +1725,12 @@ static int unzlocal_GetCurrentFileInfoInternal (unzFile file,
else else
uSizeRead = extraFieldBufferSize; uSizeRead = extraFieldBufferSize;
if (lSeek!=0) if (lSeek!=0) {
if (fseek(s->file,lSeek,SEEK_CUR)==0) if (fseek(s->file,lSeek,SEEK_CUR)==0)
lSeek=0; lSeek=0;
else else
err=UNZ_ERRNO; err=UNZ_ERRNO;
}
if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
if (fread(extraField,(uInt)uSizeRead,1,s->file)!=1) if (fread(extraField,(uInt)uSizeRead,1,s->file)!=1)
err=UNZ_ERRNO; err=UNZ_ERRNO;
@ -1749,11 +1751,12 @@ static int unzlocal_GetCurrentFileInfoInternal (unzFile file,
else else
uSizeRead = commentBufferSize; uSizeRead = commentBufferSize;
if (lSeek!=0) if (lSeek!=0) {
if (fseek(s->file,lSeek,SEEK_CUR)==0) if (fseek(s->file,lSeek,SEEK_CUR)==0)
lSeek=0; lSeek=0;
else else
err=UNZ_ERRNO; err=UNZ_ERRNO;
}
if ((file_info.size_file_comment>0) && (commentBufferSize>0)) if ((file_info.size_file_comment>0) && (commentBufferSize>0))
if (fread(szComment,(uInt)uSizeRead,1,s->file)!=1) if (fread(szComment,(uInt)uSizeRead,1,s->file)!=1)
err=UNZ_ERRNO; err=UNZ_ERRNO;
@ -1915,11 +1918,12 @@ static int unzlocal_CheckCurrentFileCoherencyHeader (unz_s* s, uInt* piSizeVar,
return UNZ_ERRNO; return UNZ_ERRNO;
if (err==UNZ_OK) if (err==UNZ_OK) {
if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK) if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
err=UNZ_ERRNO; err=UNZ_ERRNO;
else if (uMagic!=0x04034b50) else if (uMagic!=0x04034b50)
err=UNZ_BADZIPFILE; err=UNZ_BADZIPFILE;
}
if (unzlocal_getShort(s->file,&uData) != UNZ_OK) if (unzlocal_getShort(s->file,&uData) != UNZ_OK)
err=UNZ_ERRNO; err=UNZ_ERRNO;
@ -3417,7 +3421,7 @@ static int huft_build(uInt *b, uInt n, uInt s, const uInt *d, const uInt *e, inf
/* compute minimum size table less than or equal to l bits */ /* compute minimum size table less than or equal to l bits */
z = g - w; z = g - w;
z = z > (uInt)l ? l : z; /* table size upper limit */ z = z > (uInt)l ? (uInt)l : z; /* table size upper limit */
if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */
{ /* too few codes for k-w bit table */ { /* too few codes for k-w bit table */
f -= a + 1; /* deduct codes from patterns left */ f -= a + 1; /* deduct codes from patterns left */

View File

@ -85,9 +85,6 @@
#include "md4.h" #include "md4.h"
#include <stdlib.h> #include <stdlib.h>
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
/* ------------------------------------------------------------------------------- /* -------------------------------------------------------------------------------