summaryrefslogtreecommitdiff
path: root/modules/cairo-surface.cpp
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-05-24 22:03:10 +0800
committerPhilip Chimento <philip@endlessm.com>2017-05-24 11:34:27 -0700
commit418fabc8c9964490f3bf58146a647824c254cd12 (patch)
treebd5557aeaaa35056982f846bc60242e9fd81abf0 /modules/cairo-surface.cpp
parentbcd1f395801f6928c419a6bd99a35eb004be9e54 (diff)
downloadgjs-418fabc8c9964490f3bf58146a647824c254cd12.tar.gz
modules/cairo-*-surface.cpp: Silence compiler warnings
Since we moved to a using std::unique_ptr, the filename variables might be seen by the compiler as possibly uninitialized, so just set them as mullptr to silence the compiler. https://bugzilla.gnome.org/show_bug.cgi?id=783031
Diffstat (limited to 'modules/cairo-surface.cpp')
-rw-r--r--modules/cairo-surface.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/cairo-surface.cpp b/modules/cairo-surface.cpp
index bcc4f543..34803d17 100644
--- a/modules/cairo-surface.cpp
+++ b/modules/cairo-surface.cpp
@@ -66,7 +66,7 @@ writeToPNG_func(JSContext *context,
JS::Value *vp)
{
GJS_GET_THIS(context, argc, vp, argv, obj);
- char *filename;
+ char *filename = nullptr;
cairo_surface_t *surface;
if (!gjs_parse_call_args(context, "writeToPNG", argv, "F",