summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-01-24 03:13:45 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-01-24 03:13:45 (GMT)
commitcf32594c9e9bd728a72eeca8299e83e7616b30e9 (patch)
tree8a1b271c76d8b84e683286e55786814ed267495d
parented24425305d1404dc7ecfc227feddb9c0c56a66f (diff)
add lodepng.cpp, fix compiler warnings, fix qmake buildfile
-rw-r--r--openscad.pro1
-rw-r--r--src/lodepng.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/openscad.pro b/openscad.pro
index c79551e..6a8cfdb 100644
--- a/openscad.pro
+++ b/openscad.pro
@@ -298,6 +298,7 @@ SOURCES += src/version_check.cc \
src/fbo.cc \
src/system-gl.cc \
src/imageutils.cc \
+ src/lodepng.cpp \
\
src/openscad.cc \
src/mainwin.cc
diff --git a/src/lodepng.cpp b/src/lodepng.cpp
index 831194f..9d21668 100644
--- a/src/lodepng.cpp
+++ b/src/lodepng.cpp
@@ -1497,7 +1497,7 @@ static unsigned encodeLZ77(uivector* out, const unsigned char* in, size_t insize
unsigned length, tablepos;
#ifdef LAZY_MATCHING
unsigned lazy = 0;
- unsigned lazylength, lazyoffset;
+ unsigned lazylength = 0, lazyoffset = 0;
#endif /*LAZY_MATCHING*/
unsigned hash, initialZeros = 0;
unsigned backpos, current_offset, t1, t2, t11, current_length;
@@ -4679,7 +4679,7 @@ static unsigned filter(unsigned char* out, const unsigned char* in, unsigned w,
This is very slow and gives only slightly smaller, sometimes even larger, result*/
size_t size[5];
ucvector attempt[5]; /*five filtering attempts, one for each filter type*/
- size_t smallest;
+ size_t smallest = 0;
unsigned type = 0, bestType = 0;
unsigned char* dummy;
LodePNG_CompressSettings zlibsettings = settings->zlibsettings;
contact: Jan Huwald // Impressum