added a definition in getopt.h and an initial value in convert.c
[openjpeg.git] / codec / convert.c
index aaa22d536be86d1cec67819aab8c3e6e7ee46f36..de08e4c72cde2a273c13c86b72e0365fdbbca2e3 100644 (file)
@@ -2373,8 +2373,8 @@ int imagetopng(opj_image_t * image, const char *write_idf)
        unsigned char *row_buf, *d;
        int has_alpha, width, height, nr_comp, color_type;
        int adjustR, adjustG, adjustB, x, y, fails, is16, force16;
-       int opj_prec, prec, ushift, dshift;
-       unsigned short mask;
+  int opj_prec, prec, ushift, dshift;
+       unsigned short mask = 0xffff;
        png_color_8 sig_bit;
 
        is16 = force16 = ushift = dshift = 0; fails = 1;