From: cristy Date: Sat, 17 Nov 2012 21:17:59 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~4700 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9cafe595c0aaff879d99b073d73645866b418cd4;p=imagemagick --- diff --git a/tests/validate.c b/tests/validate.c index b994cb95f..2c52689c0 100644 --- a/tests/validate.c +++ b/tests/validate.c @@ -1321,6 +1321,10 @@ int main(int argc,char **argv) regard_warnings, status; + MagickSizeType + memory_resource, + map_resource; + register ssize_t i; @@ -1485,13 +1489,15 @@ int main(int argc,char **argv) tests+=ValidateImageFormatsInMemory(image_info,reference_filename, output_filename,&fail,exception); (void) FormatLocaleFile(stdout,"[pixel-cache: memory-mapped] "); - (void) SetMagickResourceLimit(MemoryResource,0); + memory_resource=SetMagickResourceLimit(MemoryResource,0); tests+=ValidateImageFormatsInMemory(image_info,reference_filename, output_filename,&fail,exception); (void) FormatLocaleFile(stdout,"[pixel-cache: disk] "); - (void) SetMagickResourceLimit(MapResource,0); + map_resource=SetMagickResourceLimit(MapResource,0); tests+=ValidateImageFormatsInMemory(image_info,reference_filename, output_filename,&fail,exception); + (void) SetMagickResourceLimit(MemoryResource,memory_resource); + (void) SetMagickResourceLimit(MapResource,map_resource); } if ((type & FormatsOnDiskValidate) != 0) { @@ -1499,13 +1505,15 @@ int main(int argc,char **argv) tests+=ValidateImageFormatsOnDisk(image_info,reference_filename, output_filename,&fail,exception); (void) FormatLocaleFile(stdout,"[pixel-cache: memory-mapped] "); - (void) SetMagickResourceLimit(MemoryResource,0); + memory_resource=SetMagickResourceLimit(MemoryResource,0); tests+=ValidateImageFormatsOnDisk(image_info,reference_filename, output_filename,&fail,exception); (void) FormatLocaleFile(stdout,"[pixel-cache: disk] "); - (void) SetMagickResourceLimit(MapResource,0); + map_resource=SetMagickResourceLimit(MapResource,0); tests+=ValidateImageFormatsOnDisk(image_info,reference_filename, output_filename,&fail,exception); + (void) SetMagickResourceLimit(MemoryResource,memory_resource); + (void) SetMagickResourceLimit(MapResource,map_resource); } if ((type & IdentifyValidate) != 0) tests+=ValidateIdentifyCommand(image_info,reference_filename,