mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-26 12:00:24 +01:00
xlib: Silence compiler warning
cairo-xlib-display.c: In function '_cairo_xlib_display_get_xrender_format': cairo-xlib-display.c:519:21: warning: 'pict_format' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
40e6be3278
commit
46d79228df
1 changed files with 5 additions and 4 deletions
|
|
@ -492,7 +492,7 @@ _cairo_xlib_display_get_xrender_format (cairo_xlib_display_t *display,
|
|||
|
||||
xrender_format = display->cached_xrender_formats[format];
|
||||
if (xrender_format == NULL) {
|
||||
int pict_format;
|
||||
int pict_format = 0;
|
||||
|
||||
switch (format) {
|
||||
case CAIRO_FORMAT_A1:
|
||||
|
|
@ -515,9 +515,10 @@ _cairo_xlib_display_get_xrender_format (cairo_xlib_display_t *display,
|
|||
case CAIRO_FORMAT_ARGB32:
|
||||
pict_format = PictStandardARGB32; break;
|
||||
}
|
||||
if (!xrender_format)
|
||||
xrender_format = XRenderFindStandardFormat (display->display,
|
||||
pict_format);
|
||||
if (pict_format) {
|
||||
xrender_format =
|
||||
XRenderFindStandardFormat (display->display, pict_format);
|
||||
}
|
||||
display->cached_xrender_formats[format] = xrender_format;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue