[farsight2/master] msnwebcam: Make code C90 compliant

Olivier Crête olivier.crete at collabora.co.uk
Tue Jul 14 09:50:34 PDT 2009


---
 gst/fsmsnconference/fs-msn-connection.c |    9 +++++----
 gst/fsmsnconference/fs-msn-stream.c     |    3 ++-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/gst/fsmsnconference/fs-msn-connection.c b/gst/fsmsnconference/fs-msn-connection.c
index fe35074..03ab76d 100644
--- a/gst/fsmsnconference/fs-msn-connection.c
+++ b/gst/fsmsnconference/fs-msn-connection.c
@@ -415,6 +415,7 @@ fs_msn_connection_attempt_connection (FsMsnConnection *connection,
   FsMsnConnection *self = FS_MSN_CONNECTION (connection);
   FsMsnPollFD *pollfd;
   gint fd = -1;
+  gint ret;
   struct sockaddr_in theiraddr;
   memset(&theiraddr, 0, sizeof(theiraddr));
 
@@ -436,7 +437,7 @@ fs_msn_connection_attempt_connection (FsMsnConnection *connection,
   g_debug ("Attempting connection to %s %d on socket %d", candidate->ip,
       candidate->port, fd);
   // this is non blocking, the return value isn't too usefull
-  gint ret = connect (fd, (struct sockaddr *) &theiraddr, sizeof (theiraddr));
+  ret = connect (fd, (struct sockaddr *) &theiraddr, sizeof (theiraddr));
   if (ret < 0)
   {
     if (errno != EINPROGRESS)
@@ -462,6 +463,7 @@ accept_connection_cb (FsMsnConnection *self, FsMsnPollFD *pollfd)
   int fd = -1;
   socklen_t n = sizeof (in);
   FsMsnPollFD *newpollfd = NULL;
+  gint i;
 
   if (gst_poll_fd_has_error (self->poll, &pollfd->pollfd) ||
       gst_poll_fd_has_closed (self->poll, &pollfd->pollfd))
@@ -486,7 +488,6 @@ accept_connection_cb (FsMsnConnection *self, FsMsnPollFD *pollfd)
  error:
   g_debug ("Got error from fd %d, closing", fd);
   // find, shutdown and remove channel from fdlist
-  gint i;
   for (i = 0; i < self->pollfds->len; i++)
   {
     FsMsnPollFD *pollfd2 = g_array_index(self->pollfds, FsMsnPollFD *, i);
@@ -507,6 +508,7 @@ successful_connection_cb (FsMsnConnection *self, FsMsnPollFD *pollfd)
 {
   gint error;
   socklen_t option_len;
+  gint i;
 
   g_debug ("handler called on fd %d", pollfd->pollfd.fd);
 
@@ -543,7 +545,6 @@ successful_connection_cb (FsMsnConnection *self, FsMsnPollFD *pollfd)
  error:
   g_debug ("Got error from fd %d, closing", pollfd->pollfd.fd);
   // find, shutdown and remove channel from fdlist
-  gint i;
   for (i = 0; i < self->pollfds->len; i++)
   {
     FsMsnPollFD *pollfd2 = g_array_index(self->pollfds, FsMsnPollFD *, i);
@@ -563,6 +564,7 @@ static void
 connection_cb (FsMsnConnection *self, FsMsnPollFD *pollfd)
 {
   gboolean success = FALSE;
+  gint i;
 
   g_debug ("handler called on fd %d. %d %d %d %d", pollfd->pollfd.fd,
       pollfd->server, pollfd->status,
@@ -782,7 +784,6 @@ connection_cb (FsMsnConnection *self, FsMsnPollFD *pollfd)
   /* Error */
   g_debug ("Got error from fd %d, closing", pollfd->pollfd.fd);
   // find, shutdown and remove channel from fdlist
-  gint i;
   for (i = 0; i < self->pollfds->len; i++)
   {
     FsMsnPollFD *pollfd2 = g_array_index(self->pollfds, FsMsnPollFD *, i);
diff --git a/gst/fsmsnconference/fs-msn-stream.c b/gst/fsmsnconference/fs-msn-stream.c
index 65a6320..f34f946 100644
--- a/gst/fsmsnconference/fs-msn-stream.c
+++ b/gst/fsmsnconference/fs-msn-stream.c
@@ -398,6 +398,7 @@ fs_msn_stream_constructed (GObject *object)
     GstElement *mimdec;
     GstElement *queue;
     GstElement *ffmpegcolorspace;
+    GstPad *tmp_src_pad;
 
     self->priv->media_fd_src = gst_element_factory_make ("fdsrc",
         "recv_fd_src");
@@ -510,7 +511,7 @@ fs_msn_stream_constructed (GObject *object)
       return;
     }
 
-    GstPad *tmp_src_pad = gst_element_get_static_pad (ffmpegcolorspace, "src");
+    tmp_src_pad = gst_element_get_static_pad (ffmpegcolorspace, "src");
     self->priv->src_pad = gst_ghost_pad_new ("src", tmp_src_pad);
     gst_object_unref (tmp_src_pad);
 
-- 
1.5.6.5




More information about the farsight-commits mailing list