testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / deref-before-check-macro-pr108745.c
blob92f5a02645de7741ed797e84feea5b6bbcb4f499
1 /* Reduced from ImageMagick-7.1.0-57. */
3 #define NULL ((void *)0)
5 typedef __builtin_va_list va_list;
6 typedef __SIZE_TYPE__ size_t;
8 typedef struct _ExceptionInfo ExceptionInfo;
10 void
11 ThrowMagickException(ExceptionInfo*,
12 const char*,
13 const char*,
14 ...) __attribute__((__format__(__printf__, 3, 4)));
16 typedef struct _Image
18 /* [...snip...] */
19 size_t columns, rows, depth, colors;
20 /* [...snip...] */
21 } Image;
23 typedef struct _ImageInfo
25 /* [...snip...] */
26 char filename[4096];
27 /* [...snip...] */
28 } ImageInfo;
30 extern Image *AcquireImage(const ImageInfo*, ExceptionInfo*);
31 extern void CloseBlob(Image*);
32 extern Image *DestroyImageList(Image*);
34 #define ThrowReaderException(tag) \
35 { \
36 (void) ThrowMagickException(exception, tag, \
37 "`%s'",image_info->filename); \
38 if ((image) != (Image *) NULL) \
39 { \
40 (void) CloseBlob(image); \
41 image=DestroyImageList(image); \
42 } \
43 return((Image *) NULL); \
46 Image*
47 ReadMAPImage(const ImageInfo* image_info, ExceptionInfo* exception)
49 Image* image;
50 image = AcquireImage(image_info, exception);
51 if ((image->columns == 0) || (image->rows == 0))
52 ThrowReaderException("MustSpecifyImageSize");
53 return image;