Commit 9f2b2a3a authored by Jose Dapena Paz's avatar Jose Dapena Paz Committed by Commit Bot

GCC: do not use anonymous structs

Two using declarations have been added in x11.h for an
unnamed struct. This is not allowed by C++ (and GCC). An example:
using XErrorEvent = struct {
  ...
};

The solution is giving a name to the struct.

Bug: 819294
Change-Id: I9e77017851efe8e0a92fb37c01fdba693bb7a36d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2412450Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/master@{#807126}
parent 8ef8a504
...@@ -139,7 +139,7 @@ using xcb_connection_t = struct xcb_connection_t; ...@@ -139,7 +139,7 @@ using xcb_connection_t = struct xcb_connection_t;
enum XEventQueueOwner { XlibOwnsEventQueue = 0, XCBOwnsEventQueue }; enum XEventQueueOwner { XlibOwnsEventQueue = 0, XCBOwnsEventQueue };
using XErrorEvent = struct { using XErrorEvent = struct _XErrorEvent {
int type; int type;
Display* display; Display* display;
XID resourceid; XID resourceid;
...@@ -149,7 +149,7 @@ using XErrorEvent = struct { ...@@ -149,7 +149,7 @@ using XErrorEvent = struct {
unsigned char minor_code; unsigned char minor_code;
}; };
using XRectangle = struct { using XRectangle = struct _XRectangle {
short x, y; short x, y;
unsigned short width, height; unsigned short width, height;
}; };
...@@ -161,7 +161,7 @@ using XExtData = struct _XExtData { ...@@ -161,7 +161,7 @@ using XExtData = struct _XExtData {
XPointer private_data; XPointer private_data;
}; };
using Visual = struct { using Visual = struct _Visual {
XExtData* ext_data; XExtData* ext_data;
VisualID visualid; VisualID visualid;
int c_class; int c_class;
...@@ -170,7 +170,7 @@ using Visual = struct { ...@@ -170,7 +170,7 @@ using Visual = struct {
int map_entries; int map_entries;
}; };
using XVisualInfo = struct { using XVisualInfo = struct _XVisualInfo {
Visual* visual; Visual* visual;
VisualID visualid; VisualID visualid;
int screen; int screen;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment