neuwld

patched neuwld library (tracked)
git clone https://git.daat.foo/neuwld.git
Log | Files | Refs | README | LICENSE

commit 5db3c08d248ba1800098462d6dd57b5942587feb
parent ca9010a6e792e6e6e532670e2c8af9c7cf0d23fe
Author: Michael Forney <mforney@mforney.org>
Date:   Tue, 31 Dec 2013 16:59:35 -0800

Fix errors/warnings

Diffstat:
Mintel.c | 1-
Mpixman.c | 14+++++++++-----
Mwayland-shm.c | 2++
Mwayland.c | 7++++---
4 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/intel.c b/intel.c @@ -255,7 +255,6 @@ void intel_draw_text_utf8(struct wld_drawable * drawable, uint32_t c; uint8_t immediate[512]; uint8_t * byte; - uint8_t byte_index; int32_t origin_x = x; xy_setup_blt(intel->context->batch, true, INTEL_BLT_RASTER_OPERATION_SRC, diff --git a/pixman.c b/pixman.c @@ -78,14 +78,18 @@ struct wld_pixman_context * wld_pixman_create_context() { struct wld_pixman_context * context; - context = malloc(sizeof *context); - - if (!context) - return NULL; + if (!(context = malloc(sizeof *context))) + goto error0; - context->glyph_cache = pixman_glyph_cache_create(); + if (!(context->glyph_cache = pixman_glyph_cache_create())) + goto error1; return context; + + error1: + free(context); + error0: + return NULL; } void wld_pixman_destroy_context(struct wld_pixman_context * context) diff --git a/wayland-shm.c b/wayland-shm.c @@ -21,6 +21,8 @@ * SOFTWARE. */ +#define _GNU_SOURCE /* Required for mkostemp */ + #include "wayland-shm.h" #include "wayland.h" #include "wayland-private.h" diff --git a/wayland.c b/wayland.c @@ -123,8 +123,10 @@ struct wld_wayland_context * wld_wayland_create_context if (!wayland) goto error0; + if (!(wayland->queue = wl_display_create_queue(display))) + goto error1; + wayland->display = display; - wayland->queue = wl_display_create_queue(display); wayland->context = NULL; wayland->interface = NULL; @@ -295,7 +297,7 @@ static void wait_for_backbuf(struct wayland_drawable * wayland) { if (BACKBUF(wayland).busy) { - int ret, count = 0; + int ret; do { ret = wl_display_dispatch_queue(wayland->context->display, @@ -397,7 +399,6 @@ void wayland_draw_text_utf8(struct wld_drawable * drawable, void wayland_flush(struct wld_drawable * drawable) { struct wayland_drawable * wayland = (void *) drawable; - pixman_region32_t damage; wait_for_backbuf(wayland);