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

Compiler warnings when compiling for 64-bit #24

Open
rggjan opened this issue Nov 18, 2015 · 3 comments
Open

Compiler warnings when compiling for 64-bit #24

rggjan opened this issue Nov 18, 2015 · 3 comments

Comments

@rggjan
Copy link

rggjan commented Nov 18, 2015

I get the following warnings when compiling on Windows for 64-bit:

lodepng.cpp(773) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
lodepng.cpp(1437) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
lodepng.cpp(1441) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
lodepng.cpp(1513) : warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data
lodepng.cpp(3458) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
lodepng.cpp(4261) : warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data
lodepng.cpp(4309) : warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data
lodepng.cpp(4389) : warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data
lodepng.cpp(5329) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data

Everything seems to work fine, though...

@Sonicious
Copy link

Yeah. I have the same problem. I just started with lodePNG, but I already love it (finally no libPNG anymore)

Is it actually possible to have some static casts to reduce the size_t warnings as well? I guess it's intended to link lodepng directly into the source and so the warnings from the libs get mixed up with my own ones which can confuse.

@rggjan
Copy link
Author

rggjan commented Jun 6, 2016

This could maybe be solved with #34

jobtalle added a commit to jobtalle/lodepng that referenced this issue Mar 18, 2017
@jobtalle
Copy link
Contributor

jobtalle commented Mar 18, 2017

#34 doesn't solve all 64bit related warnings though. I have solved them all in pull request #51.

lvandeve added a commit that referenced this issue Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants