Commit 133dd0ac authored by Tommi Komulainen's avatar Tommi Komulainen
Browse files

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
parent 179b0c44
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment