lvandeve / lodepng

PNG encoder and decoder in C and C++.
zlib License
2.06k stars 421 forks source link

Fix warnings on const cast correctness #86

Closed DennisOSRM closed 5 years ago

DennisOSRM commented 5 years ago
../third_party/lodepng/lodepng.cpp:4055:45: warning: cast from 'const unsigned char *' to 'unsigned char *' drops const qualifier [-Wcast-qual]
                            (unsigned char*)(&data[string2_begin]),
                                            ^
../third_party/lodepng/lodepng.cpp:4135:47: warning: cast from 'const unsigned char *' to 'unsigned char *' drops const qualifier [-Wcast-qual]
                              (unsigned char*)(&data[begin]),
                                              ^
../third_party/lodepng/lodepng.cpp:4248:43: warning: cast from 'const unsigned char *' to 'unsigned char *' drops const qualifier [-Wcast-qual]
                          (unsigned char*)(&data[string2_begin]),
                                          ^
../third_party/lodepng/lodepng.cpp:4778:41: warning: cast from 'const char *' to 'unsigned char *' drops const qualifier [-Wcast-qual]
                        (unsigned char*)textstring, textsize, zlibsettings);
                                        ^
../third_party/lodepng/lodepng.cpp:4811:43: warning: cast from 'const char *' to 'unsigned char *' drops const qualifier [-Wcast-qual]
                          (unsigned char*)textstring, textsize, zlibsettings);
                                          ^
5 warnings generated.
DennisOSRM commented 5 years ago

friendly ping

lvandeve commented 5 years ago

Thanks, looks great! Please check out a few comments I left

DennisOSRM commented 5 years ago

Thanks for the feedback @lvandeve. Seems the comments are not showing up. Did you forget to click submit by any chance? 😁

lvandeve commented 5 years ago

Oh, yes now it should be visible :)

DennisOSRM commented 5 years ago

Oh, yes now it should be visible :)

Thanks, changed it.

lvandeve commented 5 years ago

Thanks for fixing!