From 113baca655d7d3907e3c59b6724470010001d7d5 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Thu, 28 Apr 2016 04:00:11 -0700 Subject: [PATCH] build: fix a few warnings from clang --- daemon/sysprofd.c | 1 - src/sp-window.c | 1 - tests/test-capture.c | 2 +- tools/sysprof-cli.c | 12 ++++++------ 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/daemon/sysprofd.c b/daemon/sysprofd.c index 331abd17..681cd63b 100644 --- a/daemon/sysprofd.c +++ b/daemon/sysprofd.c @@ -66,7 +66,6 @@ sysprofd_perf_event_open (sd_bus_message *msg, { struct perf_event_attr attr = { 0 }; sd_bus_message *reply = NULL; - sd_bus_message *kvpair; uint64_t flags = 0; int disabled = 0; int32_t wakeup_events = 149; diff --git a/src/sp-window.c b/src/sp-window.c index 89898a4c..4dc6655f 100644 --- a/src/sp-window.c +++ b/src/sp-window.c @@ -763,7 +763,6 @@ sp_window_class_init (SpWindowClass *klass) static void sp_window_init (SpWindow *self) { - GAction *action; static GActionEntry action_entries[] = { { "close-capture", sp_window_close_capture }, { "open-capture", sp_window_open_capture }, diff --git a/tests/test-capture.c b/tests/test-capture.c index 0b1d1854..635dde11 100644 --- a/tests/test-capture.c +++ b/tests/test-capture.c @@ -226,7 +226,7 @@ test_reader_basic (void) for (i = 0; i < 1000; i++) { guint ids[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; - SpCaptureCounterValue values[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; + SpCaptureCounterValue values[10] = { {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10} }; r = sp_capture_writer_set_counters (writer, t, -1, -1, ids, values, G_N_ELEMENTS (values)); g_assert_cmpint (r, ==, TRUE); diff --git a/tools/sysprof-cli.c b/tools/sysprof-cli.c index 64217683..3cbbddd0 100644 --- a/tools/sysprof-cli.c +++ b/tools/sysprof-cli.c @@ -58,18 +58,18 @@ static GSourceFuncs source_funcs = { }; static void -profiler_stopped (SpProfiler *profiler, - GMainLoop *main_loop) +profiler_stopped (SpProfiler *profiler_, + GMainLoop *main_loop_) { - g_main_loop_quit (main_loop); + g_main_loop_quit (main_loop_); } static void -profiler_failed (SpProfiler *profiler, +profiler_failed (SpProfiler *profiler_, const GError *reason, - GMainLoop *main_loop) + GMainLoop *main_loop_) { - g_assert (SP_IS_PROFILER (profiler)); + g_assert (SP_IS_PROFILER (profiler_)); g_assert (reason != NULL); g_printerr ("Failure: %s\n", reason->message);