]> git.imager.perl.org - imager.git/commitdiff
- limit limits.c to C89
authorTony Cook <tony@develop=help.com>
Thu, 8 Sep 2005 07:32:17 +0000 (07:32 +0000)
committerTony Cook <tony@develop=help.com>
Thu, 8 Sep 2005 07:32:17 +0000 (07:32 +0000)
- the gif tests weren't skipping enough when there was no gif support

Changes
limits.c
t/t105gif.t

diff --git a/Changes b/Changes
index 4098d8b6eae9a8473c752aa5f7f39a12c856c772..4d44703912cc98619c69fba5213f8d421b0562e6 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1136,6 +1136,8 @@ Revision history for Perl extension Imager.
 - implement getscanline(), setscanline() and getsamples() methods.
   These are low level methods for fast access to image data, based on
   existing C functions that Imager uses internally.
+- limit limits.c to C89
+- the gif tests weren't skipping enough when there was no gif support
 
 =================================================================
 
index 01e890220d236eb2f3e68df8c59ec6db5432e077..cc2b119413de253cd9149c4be64f7fd21c1f7487 100644 (file)
--- a/limits.c
+++ b/limits.c
@@ -66,6 +66,7 @@ i_get_image_file_limits(int *width, int *height, int *bytes) {
 
 int
 i_int_check_image_file_limits(int width, int height, int channels, int sample_size) {
+  int bytes;
   i_clear_error();
   
   if (width <= 0) {
@@ -107,7 +108,7 @@ i_int_check_image_file_limits(int width, int height, int channels, int sample_si
      We don't protect it under max_bytes since we always want to check 
      for overflow.
   */
-  int bytes = width * height * channels * sample_size;
+  bytes = width * height * channels * sample_size;
   if (bytes / width != height * channels * sample_size
       || bytes / height != width * channels * sample_size) {
     i_push_error(0, "file size limit - integer overflow calculating storage");
index 084c15651a7695832f886fe37304693fcd1d68ee..70568621228876a06ec78c624769be4104ec1f3e 100644 (file)
@@ -38,7 +38,7 @@ SKIP:
     $im = Imager->new(xsize=>2, ysize=>2);
     ok(!$im->write(file=>"testout/nogif.gif"), "should fail to write gif");
     is($im->errstr, 'format not supported', "check no gif message");
-    skip("no gif support", 65);
+    skip("no gif support", 80);
   }
     open(FH,">testout/t105.gif") || die "Cannot open testout/t105.gif\n";
     binmode(FH);