commit 5db3c08
Michael Forney
·
2014-01-01 00:59:35 +0000 UTC
parent ca9010a
Fix errors/warnings
4 files changed,
+15,
-9
M
intel.c
+0,
-1
1@@ -255,7 +255,6 @@ void intel_draw_text_utf8(struct wld_drawable * drawable,
2 uint32_t c;
3 uint8_t immediate[512];
4 uint8_t * byte;
5- uint8_t byte_index;
6 int32_t origin_x = x;
7
8 xy_setup_blt(intel->context->batch, true, INTEL_BLT_RASTER_OPERATION_SRC,
M
pixman.c
+9,
-5
1@@ -78,14 +78,18 @@ struct wld_pixman_context * wld_pixman_create_context()
2 {
3 struct wld_pixman_context * context;
4
5- context = malloc(sizeof *context);
6-
7- if (!context)
8- return NULL;
9+ if (!(context = malloc(sizeof *context)))
10+ goto error0;
11
12- context->glyph_cache = pixman_glyph_cache_create();
13+ if (!(context->glyph_cache = pixman_glyph_cache_create()))
14+ goto error1;
15
16 return context;
17+
18+ error1:
19+ free(context);
20+ error0:
21+ return NULL;
22 }
23
24 void wld_pixman_destroy_context(struct wld_pixman_context * context)
+2,
-0
1@@ -21,6 +21,8 @@
2 * SOFTWARE.
3 */
4
5+#define _GNU_SOURCE /* Required for mkostemp */
6+
7 #include "wayland-shm.h"
8 #include "wayland.h"
9 #include "wayland-private.h"
+4,
-3
1@@ -123,8 +123,10 @@ struct wld_wayland_context * wld_wayland_create_context
2 if (!wayland)
3 goto error0;
4
5+ if (!(wayland->queue = wl_display_create_queue(display)))
6+ goto error1;
7+
8 wayland->display = display;
9- wayland->queue = wl_display_create_queue(display);
10 wayland->context = NULL;
11 wayland->interface = NULL;
12
13@@ -295,7 +297,7 @@ static void wait_for_backbuf(struct wayland_drawable * wayland)
14 {
15 if (BACKBUF(wayland).busy)
16 {
17- int ret, count = 0;
18+ int ret;
19
20 do {
21 ret = wl_display_dispatch_queue(wayland->context->display,
22@@ -397,7 +399,6 @@ void wayland_draw_text_utf8(struct wld_drawable * drawable,
23 void wayland_flush(struct wld_drawable * drawable)
24 {
25 struct wayland_drawable * wayland = (void *) drawable;
26- pixman_region32_t damage;
27
28 wait_for_backbuf(wayland);
29