[cairo-commit] src/cairo-script-surface.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Mon Jun 20 01:07:23 PDT 2011


 src/cairo-script-surface.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 5a79e9f536771234f5460ef35e8ed63dc5ecf82a
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Mon Jun 20 09:41:27 2011 +0200

    script: Return status when flushing device
    
    Since 92d7b1eee96e6b1448aaf3c95a44238fa0eeff48 the flush vfunction
    should return a cairo_status_t.
    
    Silences the warning:
    
    cairo-script-surface.c: At top level:
    cairo-script-surface.c:3528:5: warning: initialization from
    incompatible pointer type [enabled by default]
    cairo-script-surface.c:3528:5: warning: (near initialization for
    '_cairo_script_device_backend.flush') [enabled by default]

diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c
index e925269..89311a0 100644
--- a/src/cairo-script-surface.c
+++ b/src/cairo-script-surface.c
@@ -1901,13 +1901,12 @@ _cairo_script_surface_create_similar (void	       *abstract_surface,
     return &surface->base;
 }
 
-static void
+static cairo_status_t
 _device_flush (void *abstract_device)
 {
     cairo_script_context_t *ctx = abstract_device;
-    cairo_status_t status;
 
-    status = _cairo_output_stream_flush (ctx->stream);
+    return _cairo_output_stream_flush (ctx->stream);
 }
 
 static void


More information about the cairo-commit mailing list