annotate gcc/testsuite/gcc.c-torture/compile/pr37381.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 extern unsigned int __invalid_size_argument_for_IOC;
kono
parents:
diff changeset
2 typedef unsigned int __u32;
kono
parents:
diff changeset
3 struct video_window
kono
parents:
diff changeset
4 {
kono
parents:
diff changeset
5 __u32 x, y;
kono
parents:
diff changeset
6 __u32 width, height;
kono
parents:
diff changeset
7 };
kono
parents:
diff changeset
8 typedef unsigned long XID;
kono
parents:
diff changeset
9 typedef XID Window;
kono
parents:
diff changeset
10 typedef struct _XExtData
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 Window root;
kono
parents:
diff changeset
13 }
kono
parents:
diff changeset
14 Screen;
kono
parents:
diff changeset
15 typedef struct
kono
parents:
diff changeset
16 {
kono
parents:
diff changeset
17 int border_width;
kono
parents:
diff changeset
18 }
kono
parents:
diff changeset
19 XWindowAttributes;
kono
parents:
diff changeset
20 typedef struct _XDisplay Display;
kono
parents:
diff changeset
21 typedef struct
kono
parents:
diff changeset
22 {
kono
parents:
diff changeset
23 int default_screen;
kono
parents:
diff changeset
24 Screen *screens;
kono
parents:
diff changeset
25 }
kono
parents:
diff changeset
26 *_XPrivDisplay;
kono
parents:
diff changeset
27 typedef struct
kono
parents:
diff changeset
28 {
kono
parents:
diff changeset
29 int x, y;
kono
parents:
diff changeset
30 }
kono
parents:
diff changeset
31 XSizeHints;
kono
parents:
diff changeset
32 typedef struct
kono
parents:
diff changeset
33 {
kono
parents:
diff changeset
34 unsigned short hdisplay;
kono
parents:
diff changeset
35 unsigned short vdisplay;
kono
parents:
diff changeset
36 }
kono
parents:
diff changeset
37 XF86VidModeModeInfo;
kono
parents:
diff changeset
38 Display *display;
kono
parents:
diff changeset
39 int tfd;
kono
parents:
diff changeset
40 int ccapt;
kono
parents:
diff changeset
41 int tml;
kono
parents:
diff changeset
42 int fswidth = 0;
kono
parents:
diff changeset
43 int fsheight = 0;
kono
parents:
diff changeset
44 Window fmwin;
kono
parents:
diff changeset
45 XF86VidModeModeInfo **modelines, *fullscreenmode = ((void *) 0);
kono
parents:
diff changeset
46 struct video_window vswin;
kono
parents:
diff changeset
47 DoFullScreen (void)
kono
parents:
diff changeset
48 {
kono
parents:
diff changeset
49 int i;
kono
parents:
diff changeset
50 int rx, ry;
kono
parents:
diff changeset
51 Window junkwin;
kono
parents:
diff changeset
52 XSizeHints fmsizehints;
kono
parents:
diff changeset
53 XWindowAttributes fmwinattr;
kono
parents:
diff changeset
54 if (ioctl
kono
parents:
diff changeset
55 (tfd,
kono
parents:
diff changeset
56 (((1U) << (((0 + 8) + 8) + 14)) | ((('v')) << (0 + 8)) | (((8)) << 0) |
kono
parents:
diff changeset
57 (((((sizeof (int) == sizeof (int[1])
kono
parents:
diff changeset
58 && sizeof (int) <
kono
parents:
diff changeset
59 (1 << 14)) ? sizeof (int) : __invalid_size_argument_for_IOC))) <<
kono
parents:
diff changeset
60 ((0 + 8) + 8))), &ccapt) < 0)
kono
parents:
diff changeset
61 {
kono
parents:
diff changeset
62 perror ("ioctl VIDIOCCAPTURE");
kono
parents:
diff changeset
63 }
kono
parents:
diff changeset
64 if (!XTranslateCoordinates
kono
parents:
diff changeset
65 (display, fmwin,
kono
parents:
diff changeset
66 ((&((_XPrivDisplay) display)->
kono
parents:
diff changeset
67 screens[(((_XPrivDisplay) display)->default_screen)])->root),
kono
parents:
diff changeset
68 -fmwinattr.border_width, -fmwinattr.border_width, &rx, &ry, &junkwin))
kono
parents:
diff changeset
69 {
kono
parents:
diff changeset
70 }
kono
parents:
diff changeset
71 vswin.width = fswidth;
kono
parents:
diff changeset
72 vswin.height = fsheight;
kono
parents:
diff changeset
73 vswin.x = fmsizehints.x + rx;
kono
parents:
diff changeset
74 vswin.y = fmsizehints.y + ry;
kono
parents:
diff changeset
75 if (ioctl
kono
parents:
diff changeset
76 (tfd,
kono
parents:
diff changeset
77 (((1U) << (((0 + 8) + 8) + 14)) | ((('v')) << (0 + 8)) | (((8)) << 0) |
kono
parents:
diff changeset
78 (((((sizeof (int) == sizeof (int[1])
kono
parents:
diff changeset
79 && sizeof (int) <
kono
parents:
diff changeset
80 (1 << 14)) ? sizeof (int) : __invalid_size_argument_for_IOC))) <<
kono
parents:
diff changeset
81 ((0 + 8) + 8))), &ccapt) < 0)
kono
parents:
diff changeset
82 {
kono
parents:
diff changeset
83 XF86VidModeGetAllModeLines (display, XDefaultScreen (display), &tml,
kono
parents:
diff changeset
84 &modelines);
kono
parents:
diff changeset
85 {
kono
parents:
diff changeset
86 if ((modelines[i]->hdisplay == fswidth)
kono
parents:
diff changeset
87 && (modelines[i]->vdisplay == fsheight))
kono
parents:
diff changeset
88 {
kono
parents:
diff changeset
89 fullscreenmode = modelines[i];
kono
parents:
diff changeset
90 }
kono
parents:
diff changeset
91 }
kono
parents:
diff changeset
92 {
kono
parents:
diff changeset
93 XF86VidModeSetViewPort (display, XDefaultScreen (display), vswin.x,
kono
parents:
diff changeset
94 vswin.y);
kono
parents:
diff changeset
95 }
kono
parents:
diff changeset
96 }
kono
parents:
diff changeset
97 }