sna: Use named initializers
Avoid -Wno-missing-field-initializers by using named initializers. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
This commit is contained in:
parent
696f7eda80
commit
24a06fef71
|
|
@ -129,7 +129,6 @@ sna = static_library('sna',
|
|||
link_with : [ brw, fb, ],
|
||||
include_directories : inc,
|
||||
c_args : [
|
||||
'-Wno-missing-field-initializers',
|
||||
'-Wno-unused-but-set-variable',
|
||||
'-Wno-expansion-to-defined',
|
||||
'-Wno-shift-negative-value',
|
||||
|
|
|
|||
|
|
@ -1074,7 +1074,7 @@ sna_composite_rectangles(CARD8 op,
|
|||
}
|
||||
} else {
|
||||
for (i = 0; i < num_boxes; i++) {
|
||||
RegionRec tmp = { boxes[i] };
|
||||
RegionRec tmp = { .extents = boxes[i], };
|
||||
if (pixman_region_intersect(&tmp, &tmp, dst->pCompositeClip)) {
|
||||
int n = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -7316,7 +7316,7 @@ next_crtc:
|
|||
}
|
||||
|
||||
static const xf86CrtcConfigFuncsRec sna_mode_funcs = {
|
||||
sna_mode_resize
|
||||
.resize = sna_mode_resize,
|
||||
};
|
||||
|
||||
static void set_size_range(struct sna *sna)
|
||||
|
|
@ -7784,7 +7784,7 @@ static bool has_flip__async(struct sna *sna)
|
|||
struct local_get_cap {
|
||||
uint64_t name;
|
||||
uint64_t value;
|
||||
} cap = { DRM_CAP_ASYNC_PAGE_FLIP };
|
||||
} cap = { .name = DRM_CAP_ASYNC_PAGE_FLIP, };
|
||||
|
||||
if (sna->flags & SNA_NO_FLIP)
|
||||
return false;
|
||||
|
|
@ -9682,7 +9682,7 @@ fixup_flip:
|
|||
__FUNCTION__, __sna_crtc_id(crtc), crtc->flip_bo->handle, crtc->flip_bo->active_scanout, crtc->flip_serial));
|
||||
|
||||
{
|
||||
struct drm_i915_gem_busy busy = { flip_bo->handle };
|
||||
struct drm_i915_gem_busy busy = { .handle = flip_bo->handle, };
|
||||
if (drmIoctl(sna->kgem.fd, DRM_IOCTL_I915_GEM_BUSY, &busy) == 0) {
|
||||
if (busy.busy) {
|
||||
int mode = KGEM_RENDER;
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ sna_mode_resize(ScrnInfoPtr scrn, int width, int height)
|
|||
}
|
||||
|
||||
static const xf86CrtcConfigFuncsRec sna_mode_funcs = {
|
||||
sna_mode_resize
|
||||
.resize = sna_mode_resize,
|
||||
};
|
||||
|
||||
static bool add_fake_output(struct sna *sna, bool late)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,11 @@ static Atom xvGamma0, xvGamma1, xvGamma2, xvGamma3, xvGamma4, xvGamma5;
|
|||
#define IMAGE_MAX_WIDTH_LEGACY 1024
|
||||
#define IMAGE_MAX_HEIGHT_LEGACY 1088
|
||||
|
||||
static XvFormatRec Formats[] = { {15}, {16}, {24} };
|
||||
static XvFormatRec Formats[] = {
|
||||
{ .depth = 15, },
|
||||
{ .depth = 16, },
|
||||
{ .depth = 24, },
|
||||
};
|
||||
|
||||
static const XvAttributeRec Attributes[] = {
|
||||
{XvSettable | XvGettable, 0, (1 << 24) - 1, (char *)"XV_COLORKEY"},
|
||||
|
|
|
|||
|
|
@ -72,7 +72,13 @@ struct local_mode_set_plane {
|
|||
|
||||
static Atom xvColorKey, xvAlwaysOnTop, xvSyncToVblank, xvColorspace;
|
||||
|
||||
static XvFormatRec formats[] = { {8}, {15}, {16}, {24}, {30} };
|
||||
static XvFormatRec formats[] = {
|
||||
{ .depth = 8, },
|
||||
{ .depth = 15, },
|
||||
{ .depth = 16, },
|
||||
{ .depth = 24, },
|
||||
{ .depth = 30, },
|
||||
};
|
||||
static const XvImageRec images[] = { XVIMAGE_YUY2, XVIMAGE_UYVY,
|
||||
XVMC_RGB888 };
|
||||
static const XvImageRec images_rgb565[] = { XVIMAGE_YUY2, XVIMAGE_UYVY,
|
||||
|
|
|
|||
|
|
@ -39,7 +39,10 @@
|
|||
static Atom xvBrightness, xvContrast, xvSyncToVblank, xvColorspace;
|
||||
|
||||
static XvFormatRec Formats[] = {
|
||||
{15}, {16}, {24}, {30}
|
||||
{ .depth = 15, },
|
||||
{ .depth = 16, },
|
||||
{ .depth = 24, },
|
||||
{ .depth = 30, },
|
||||
};
|
||||
|
||||
static const XvAttributeRec Attributes[] = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue