[sysprof] build: fix a few warnings from clang



commit 113baca655d7d3907e3c59b6724470010001d7d5
Author: Christian Hergert <chergert redhat com>
Date:   Thu Apr 28 04:00:11 2016 -0700

    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 331abd1..681cd63 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 89898a4..4dc6655 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 0b1d185..635dde1 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 6421768..3cbbddd 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);


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