configure: Fix compile warning in PNG test
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 18 Jul 2012 14:10:24 +0000 (15:10 +0100)
committerBlue Swirl <blauwirbel@gmail.com>
Tue, 31 Jul 2012 20:05:52 +0000 (20:05 +0000)
Fix compile warning (variable 'png_ptr' set but not used) in the
PNG detection test code.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
configure

index 8a8ad27..b29cdd3 100755 (executable)
--- a/configure
+++ b/configure
@@ -1729,7 +1729,7 @@ cat > $TMPC <<EOF
 int main(void) {
     png_structp png_ptr;
     png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-    return 0;
+    return png_ptr != 0;
 }
 EOF
   if $pkg_config libpng --modversion >/dev/null 2>&1; then