[gjs] cairo: fix _GJS_CAIRO_CONTEXT_DEFINE_FUNC2B return value handling



commit 133dd0ac308fc3b64f8c70ed92bc2a01a89d078a
Author: Tommi Komulainen <tko litl com>
Date:   Tue Mar 30 11:24:07 2010 +0100

    cairo: fix _GJS_CAIRO_CONTEXT_DEFINE_FUNC2B return value handling
    
    Initialize and return the return value from the called function. Fixes
    compiler warnings.
    
    modules/cairo-context.c: In function â??inStroke_funcâ??:
    modules/cairo-context.c:332: warning: â??retâ?? is used uninitialized in this function
    modules/cairo-context.c: In function â??inFill_funcâ??:
    modules/cairo-context.c:331: warning: â??retâ?? is used uninitialized in this function
    
    https://bugzilla.gnome.org/show_bug.cgi?id=614344

 modules/cairo-context.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/modules/cairo-context.c b/modules/cairo-context.c
index aff594a..0d50721 100644
--- a/modules/cairo-context.c
+++ b/modules/cairo-context.c
@@ -156,7 +156,7 @@ _GJS_CAIRO_CONTEXT_DEFINE_FUNC_BEGIN(method)                               \
                         #n1, &arg1, #n2, &arg2))                           \
         return JS_FALSE;                                                   \
     cr = gjs_cairo_context_get_context(context, obj);                      \
-    cfunc(cr, arg1, arg2);                                                 \
+    ret = cfunc(cr, arg1, arg2);                                           \
     *retval = BOOLEAN_TO_JSVAL(ret);                                       \
 _GJS_CAIRO_CONTEXT_DEFINE_FUNC_END
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]