aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-10-06 15:57:13 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-10-06 15:57:13 -0500
commit94ba0a4147052dec53e2ba818ec3d03141e8f26b (patch)
treea0d056d8ef5c710085afbddca6c208fd805cc851
parent997f89bae00ec896c87a8a3877d2d16fc0175f99 (diff)
downloadayatana-indicator-display-94ba0a4147052dec53e2ba818ec3d03141e8f26b.tar.gz
ayatana-indicator-display-94ba0a4147052dec53e2ba818ec3d03141e8f26b.tar.bz2
ayatana-indicator-display-94ba0a4147052dec53e2ba818ec3d03141e8f26b.zip
don't use 'auto tmp = ...' when tmp is going to be passed to g_free()
-rw-r--r--src/exporter.cpp2
-rw-r--r--tests/glib-fixture.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/exporter.cpp b/src/exporter.cpp
index 8b2a72a..21e8af7 100644
--- a/src/exporter.cpp
+++ b/src/exporter.cpp
@@ -140,7 +140,7 @@ private:
g_action_map_add_action(G_ACTION_MAP(action_group), G_ACTION(a));
profile->header().changed().connect([action_group,action_name](const Header& header){
auto state = create_header_state(header);
- auto tmp = g_variant_print(state, true);
+ char* tmp = g_variant_print(state, true);
g_debug("header changed; updating action state to '%s'", tmp);
g_action_group_change_action_state(G_ACTION_GROUP(action_group),
action_name.c_str(),
diff --git a/tests/glib-fixture.h b/tests/glib-fixture.h
index a5da2f5..65d2921 100644
--- a/tests/glib-fixture.h
+++ b/tests/glib-fixture.h
@@ -67,7 +67,7 @@ class GlibFixture : public ::testing::Test
const gchar * message,
gpointer self)
{
- auto tmp = g_strdup_printf ("%s:%d \"%s\"", log_domain, (int)log_level, message);
+ char* tmp = g_strdup_printf ("%s:%d \"%s\"", log_domain, (int)log_level, message);
static_cast<GlibFixture*>(self)->log[log_level].push_back(tmp);
g_free(tmp);
}