#include "magick/utility.h"
#if defined(MAGICKCORE_PNG_DELEGATE)
-/* Suppress libpng pedantic warnings */
-#define PNG_DEPRECATED /* use of this function is deprecated */
-#define PNG_USE_RESULT /* the result of this function must be checked */
-#define PNG_NORETURN /* this function does not return */
-#define PNG_ALLOCATED /* the result of the function is new memory */
-#define PNG_DEPSTRUCT /* access to this struct member is deprecated */
+/* Suppress libpng pedantic warnings that were added in
+ * libpng-1.2.41 and libpng-1.4.0. If you are working on
+ * migration to libpng-2.0, remove these defines and then
+ * fix any code that generates warnings.
+ */
+#define PNG_DEPRECATED /* Use of this function is deprecated */
+#define PNG_USE_RESULT /* The result of this function must be checked */
+#define PNG_NORETURN /* This function does not return */
+#define PNG_ALLOCATED /* The result of the function is new memory */
+#define PNG_DEPSTRUCT /* Access to this struct member is deprecated */
#include "png.h"
#include "zlib.h"