Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

silence warning 'possible loss of data' (win64) #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions lodepng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3046,7 +3046,7 @@ static int color_tree_has(ColorTree* tree, unsigned char r, unsigned char g, uns
/*color is not allowed to already exist.
Index should be >= 0 (it's signed to be compatible with using -1 for "doesn't exist")*/
static void color_tree_add(ColorTree* tree,
unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned index)
unsigned char r, unsigned char g, unsigned char b, unsigned char a, size_t index)
{
int bit;
for(bit = 0; bit < 8; ++bit)
Expand Down Expand Up @@ -4313,7 +4313,7 @@ static unsigned readChunk_tEXt(LodePNGInfo* info, const unsigned char* data, siz

while(!error) /*not really a while loop, only used to break on error*/
{
unsigned length, string2_begin;
size_t length, string2_begin;

length = 0;
while(length < chunkLength && data[length] != 0) ++length;
Expand Down Expand Up @@ -4354,7 +4354,7 @@ static unsigned readChunk_zTXt(LodePNGInfo* info, const LodePNGDecompressSetting
unsigned error = 0;
unsigned i;

unsigned length, string2_begin;
size_t length, string2_begin;
char *key = 0;
ucvector decoded;

Expand Down Expand Up @@ -4401,9 +4401,10 @@ static unsigned readChunk_iTXt(LodePNGInfo* info, const LodePNGDecompressSetting
const unsigned char* data, size_t chunkLength)
{
unsigned error = 0;
unsigned i;
size_t i;

unsigned length, begin, compressed;
size_t length, begin;
unsigned compressed;
char *key = 0, *langtag = 0, *transkey = 0;
ucvector decoded;
ucvector_init(&decoded);
Expand Down