Bug 623796 - nsPNGDecoder.cpp:642:44: warning: passing NULL to non-pointer argument 2 of 'void MOZ_PNG_set_crc_action(png_struct*, int, int)'; r,a=joe
authorGlenn Randers-Pehrson <glennrp+bmo@gmail.com>
Mon, 31 Jan 2011 22:45:10 -0500
changeset 61716 27e81aa25025037973a39210c5d87d04484c9173
parent 61715 fd63bdaa9cfc0351c75a5945f1bd0fcd5b19cf8b
child 61717 8679bd6e8290e37c60a13ee17c04e4cd174ccec3
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersjoe
bugs623796
milestone2.0b11pre
Bug 623796 - nsPNGDecoder.cpp:642:44: warning: passing NULL to non-pointer argument 2 of 'void MOZ_PNG_set_crc_action(png_struct*, int, int)'; r,a=joe
modules/libpr0n/decoders/nsPNGDecoder.cpp
--- a/modules/libpr0n/decoders/nsPNGDecoder.cpp
+++ b/modules/libpr0n/decoders/nsPNGDecoder.cpp
@@ -642,17 +642,17 @@ nsPNGDecoder::info_callback(png_structp 
     }
   }
 
   /* Reject any ancillary chunk after IDAT with a bad CRC (bug #397593).
    * It would be better to show the default frame (if one has already been
    * successfully decoded) before bailing, but it's simpler to just bail
    * out with an error message.
    */
-  png_set_crc_action(png_ptr, NULL, PNG_CRC_ERROR_QUIT);
+  png_set_crc_action(png_ptr, PNG_CRC_NO_CHANGE, PNG_CRC_ERROR_QUIT);
 
   return;
 }
 
 void
 nsPNGDecoder::row_callback(png_structp png_ptr, png_bytep new_row,
                            png_uint_32 row_num, int pass)
 {