[Nice] [PATCH 1/4] Remove some "set but not used" variables since GCC 4.6 emit a warning about that
Timothy Redaelli
timothy at redaelli.eu
Thu Mar 31 06:27:37 PDT 2011
---
agent/agent.c | 3 +--
tests/test-thread.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/agent/agent.c b/agent/agent.c
index 8eedc0c..26fd203 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -2807,14 +2807,13 @@ GSource* agent_timeout_add_with_context (NiceAgent *agent, guint interval,
GSourceFunc function, gpointer data)
{
GSource *source;
- guint id;
g_return_val_if_fail (function != NULL, 0);
source = g_timeout_source_new (interval);
g_source_set_callback (source, function, data, NULL);
- id = g_source_attach (source, agent->main_context);
+ g_source_attach (source, agent->main_context);
return source;
}
diff --git a/tests/test-thread.c b/tests/test-thread.c
index 6bd1a24..3af4673 100644
--- a/tests/test-thread.c
+++ b/tests/test-thread.c
@@ -179,7 +179,6 @@ int main (void)
{
NiceAgent *lagent, *ragent; /* agent's L and R */
NiceAddress baseaddr;
- guint timer_id;
const char *stun_server = NULL, *stun_server_port = NULL;
GMainContext *lmainctx, *rmainctx;
GMainLoop *lmainloop, *rmainloop;
@@ -218,7 +217,7 @@ int main (void)
g_object_set (G_OBJECT (ragent), "upnp", FALSE, NULL);
/* step: add a timer to catch state changes triggered by signals */
- timer_id = g_timeout_add (30000, timer_cb, NULL);
+ g_timeout_add (30000, timer_cb, NULL);
/* step: specify which local interface to use */
if (!nice_address_set_from_string (&baseaddr, "127.0.0.1"))
--
1.7.4.2
More information about the Nice
mailing list